In Part 1 I said every project of mine now runs in a Docker Sandbox, and I promised to explain why I picked that over a plain dev container.
A dev container is a big step up from running an agent straight on your laptop. It stops the agent wandering into your other repos and your ~/.ssh . It still leaves two gaps.
Gap 1: the kernel is shared
A container shares your machine's kernel. If anything breaks out, it lands on your host, with all the credentials from Part 1 sitting there.
Gap 2: Docker inside Docker
Most of my projects need Docker for Postgres, Redis and Mailpit. Giving an agent Docker from inside a container usually means mounting the Docker socket:
docker run -v /var/run/docker.sock:/var/run/docker.sock ...
Enter fullscreen mode
Exit fullscreen mode
That effectively hands the agent your machine.…