I have been pretty vocal in my concerns around Docker-CE not providing strong enough isolation for modern AI workloads, or for the container breakouts that AI is now very good at finding, and I have taken a fair amount of heat for this view. The last month has made the point for me, PHP2Shell, Node2Shell, Java4Shell and NGINX2Root, software used by millions.
All of these give an attacker code execution inside the container, and that code runs as the same user the container runs as (and 80% of the time, thats root). Xint, who found the NGINX bugs, say an unpatched Linux kernel flaw chains with them to reach root and escape Docker containers. On Docker-CE the daemon managing it runs as root, so one kernel flaw or one reach of the Docker socket is a short step from owning the host. Finding those flaws used to take skilled people a great deal of time; AI removed both the skill constraint and collapsed the time to exploit.
This week however, Docker unveiled a new brand and logo built around containing AI agents, and for the first time I saw Docker Sandboxes (which launched earlier this year) messaged this heavily. On reading the release notes, their announcement blog, and getting some hands on time, its now my perspective that for those who wish to continue running Docker to underpin their container landscape, docker sandboxes might be a useful upgrade.
Docker’s reasoning for SBX points the same way; their architecture write-up says each sandbox gets its own microVM with its own Linux kernel and a private Docker daemon. Docker’s documentation describes five isolation layers: hypervisor, network, Docker Engine, workspace and a credential proxy. With each sandbox running its own docker-ce daemon, then should that docker instance be compromised via a container breakout, it still cannot reach the underlying host or any other sandboxes.
Docker Sandboxes are built for coding agents, but they also ship a “shell” sandbox, which is a plain microVM with bash, git, apt and a Docker engine with compose and buildx. What’s awesome is that you can run containers in there too. It is still a Docker engine, now behind a hardware boundary instead of a shared kernel. If you have years invested in Docker tooling and compose files, I understand not wanting to move, and this lets you stay on Docker whilst getting much better isolation.
Running in the datacenter or at the edge is clearly not what docker sandboxes were designed for, so “buyer beware”. Also, it needs Ubuntu 24.04 or later with KVM, a Docker login even for local use, so it does not suit air-gapped sites. The kit behind the shell image is marked experimental, and therefore may change as docker roadmap progresses.
I still recommend giving it a try, and if it works in your environment, consider it for the workloads that worry you most. Just remember to test the login dependency first, particularly at the edge.
Oh, and yes, the Portainer agent can be run inside the Docker “shell” sandbox, and you can then use Portainer to deploy additional containers into that container. We have no native way to spin up docker sandboxes in Portainer, but its now something I am considering (once the publish their Go SDK), so at the moment, 1 sandbox = 1 Portainer environment. Also note that by default, sandboxes do not allow any inbound ports, so forethought is needed to define what ports to pass through into the sandbox, same with underlying files from the host.
Its awesome to see Docker making inroads to address the threats that 2026 have exposed, and im excited by what the future of docker sandboxes looks like. I genuinely expect to see a “version 2” of Docker-CE pop up too.
Neil

