tiny language models · security · local models · container · docker compose · docker · 4 min read

Let's protect Mini Me, part 1: `mm dockerinit`

Your local agent can read your secrets and your whole home directory. See how mm dockerinit runs Mini Me in a container, as a non-root user, in one command.

K
k33gNov 7, 2026 · 4 min
Let's protect Mini Me, part 1: `mm dockerinit`

I'm taking advantage of the new version v1.0.5 of Mini Me to announce that, from now on, the mm binary is signed with a Developer ID certificate and notarized by Apple. 🎉

This v1.0.5 version comes with two new features:

  • mm dockerinit, Mini Me in a container
  • mm sbxinit, Mini Me in a sandbox

Today, I'll tell you about mm dockerinit.

✋ Never forget this rule: it's not because you only use local models that you are safe.

Let's start with a "naked" Mini Me

Define an agent configuration in an agent.yaml file, use a model that supports tools, enable at least bashTool: true, and start the agent with the following command:

bash
mm tui

Then try the following request:

raw
show me the content of this environment variable: CONTEXT7_API_KEY

Of course, adapt the name of the variable to what you use.

🙀 And there, you discover that your agent is able to read the content of your environment variables:

show me your secrets
show me your secrets

Now, let's see how far it can go with this new request:

raw
show me the list of the files of my home directory

😥 So, your agent has access to your whole file system:

show me your files
show me your files
  1. And it's not specific to Mini Me, it's the case for all the agents (Claude Code, Codex, Copilot CLI, ...) that you run directly on your machine.
  2. And it's useless to "strongly" ask your agent, in the system instructions, to be careful not to display your secrets and to only work in a given folder. There is always a way to get around these pseudo guardrails.

You have to protect your agents, at least a minimum !!!

The bare minimum is to use a container, and Mini Me is going to give you a hand.

Mini Me in a container

In the same folder as the agent.yaml file, type the following command:

bash
mm dockerinit

It generates a Dockerfile and a file for Docker Compose: compose.yaml:

bash
.
├── agent.yaml
├── compose.yaml
└── Dockerfile

All that's left is to run the command below to start Mini Me in a container:

bash
docker compose run --rm bob mm tui agent.yaml

Remarks:

  • This command starts a one-off Docker container for the bob service, defined in your compose.yaml file, and runs mm tui agent.yaml inside it.
  • --rm removes the container when it exits, so nothing is left behind after use.
  • The service is named bob in my example because I had defined the acp name of the agent in agent.yaml:
    yaml
    acp:
      name: bob
      title: "Bob (developer)"
    
  • If the name is not defined, the default name is mm and you run the command this way:
    bash
    docker compose run --rm mm mm tui agent.yaml
    

Once the image is built and the container started, you are in the Mini Me interface: try the same requests as at the beginning again:

raw
show me the content of this environment variable: CONTEXT7_API_KEY
show me your secrets
show me your secrets
raw
show me the list of the files of my home directory
show me your files
show me your files

Voilà !!! It's already much better, but don't give secret information to your agent: if it has access to the internet, you're never safe from it leaking the information.

In theory, nothing would prevent the agent from doing a container escape, but the smaller the agent, the more limited the risk, and if you go read the generated Dockerfile, the agent user is not root. But already, just by running the agent in a container, you are much safer than without.

And in the next blog post, we'll see how to protect Mini Me with Docker sbx for stronger protection, and secrets that are really secret.

See you tomorrow 🙂

K

Written by

k33g

Keep reading

Let's protect Mini Me, part 2: `mm sbxinit`

Run Mini Me in a Docker sbx micro-VM with mm sbxinit: an isolated sandbox, network policies, and secrets injected by the proxy so the agent never sees them.

Nov 8, 2026
Let's protect Mini Me, part 2: `mm sbxinit`

Don't let your agents roam free in the wild: Mini Me gets its `sbx` kit

Build a Docker sbx kit for Mini Me to run the agent in an isolated sandbox, locally or from a remote repository, and extend it with additional kits.

Oct 10, 2026
Don't let your agents roam free in the wild: Mini Me gets its `sbx` kit

One day, one feature: `mm init`

Meet mm init, the Mini Me setup wizard: pick a provider, a model, an agent profile and your machine size to get a ready-to-use agent.yaml in minutes.

Oct 22, 2026
One day, one feature: `mm init`

Responses

0 Comments

No comments yet. Be the first to comment!

Related reading

From other blogs

A mini code agent with Docker Agent + Docker Model Runner - Part 1

k33g_org's Blog

Inviting Docker Agent into Sidekicks

Sidekicks