The local steps ran on Mac with sbx 0.54.1; the GitHub secret and cloud parts come from Docker's docs.
If you use Claude Code or Codex every day, you know how this goes. At first you approve every command. By the twentieth npm install you're tired of clicking yes, so you let the agent run on its own.
From that point on, the agent is working on your laptop, in your shell, with your files and your credentials, and nobody is watching each step. Usually nothing goes wrong. But "usually" isn't a security model.
Docker Sandboxes are Docker's answer to this. In this post I'll cover what they are, how to set one up, and what they don't protect you from.
Why a normal container isn't enough
Most of us would reach for a container first. Put the agent in a container and call it done.
The problem is that agents usually need Docker too, to build an image or start a test database. The quick fix is to mount /var/run/docker.sock into the container.β¦