Live data from Hacker News

Docker Sandboxes – Disposable, isolated sandboxes for AI agents

docker.com

291–300 of 416 posts

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#291
post #148

Earlier quoted context omitted.

I have tested it and the big advantage is that is has access to the local development tools. But it’s not as well sandboxed for sure.

Why do you say that? Eg, if used with Colima in macOS, it means I can run a devcontainer in an isolated VM and Nono inside the devcontainer can restrict a lot what can and cannot be done. You get credentials proxying and network outbound limits. How is Docker Sandbox better sandboxed?

Yeah but that’s Colima and Nono then. Not only Nono.

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#293

Earlier quoted context omitted.

what's to stop an agent creating an outbound call with the var to a malicious endpoint? (unless you whitelist what it has access to)

You just don't inject the real secret unless hostname/whatever rule matches the request, right? I don't know if that's how this works but it's my assumption.

On the Docker DevRel team... yes! This is it. The secret is injected only into headers in which the hostname matches.

There's also an ability to create kits where you can setup credential injection into other services as well.

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#294
post #279

Not a substantive comment on content but hopefully constructive feedback on presentation: Holy moly, on mobile I was trying to read the example console screenshots/snippets and then it would just unexpectedly change. Took me a little while to figure out it’s some kind of carousel for the examples, and not more screenshots/snippets loading and pushing down content (or me going crazy). Please don’t do this on mobile si…

Thanks for the feedback! Will pass it on to the web team to get this more mobile-friendly.

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#295

Since everyone is sharing their setup, here’s my approach, just to give people an idea of how others are doing it, however impractical it might look: I run a full Linux VM (with a GUI) on my Linux host. I connect via virt-viewer to run Claude Desktop, as I’m not a fan of using the terminal for this. The VM sits on its own libvirt network in a dedicated firewall zone, and specific directories are shared via filesystem…

Do you find the permanence of a full VM useful? I’ve wondered about something like this but always defaulted to Docker for much the same reasons people use stuff like Ansible. I’m afraid the LLM will heavily customize its environment and I’ll be unable to replicate it when my laptop dies or I can’t upgrade the OS or whatever. Then again, I guess GUI is a pain in Docker. I tend to operate through Zed and an ACP harnes…

> I’m afraid the LLM will heavily customize its environment and I’ll be unable to replicate it

Would suggest Hashicorp Packer or cloud-init for deterministic images, not hard to setup or use. LLM's have little problem with them either I find.

If you need quicker environment rebuilds consider using something smaller like alpine as the base, though once you setup a golden image even heavy things like debian are fine.

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#296

I tried Docker Sandboxes but last time I checked you could not configure custom volume mounts, making more complex setups impossible. For work I need two directories for context for the agent to have access to…

When starting a sandbox, you can specify the mountpoints you want. It just defaults to the current directory. You can also specify some of those mounts as read-only as well.

Example: sbx run claude ./ ../another-project:ro

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#297
post #93

...or...just hear me out now...we could limit it in the harness. Don't give it shell access, just predefined tools.

Disclaimer - on the Docker DevRel team

One of the demos I run is how easy it is to circumvent the harness limits. For example, I can configure a harness not to access file `secrets.txt`. But, then I can immediately have it create a Python file that can read any file and have it read `secrets.txt`.

At the end of the day, "please" isn't security. You want to know that the agent can only do and access the things it should access.

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#298
I work at Docker. Lot of valid and useful feedback here that we're looking closely at.

One correction: this isn't containers. Each session is a microVM with its own kernel on the platform's native hypervisor: Hypervisor.framework, WHP, KVM. We wrote a new VMM (not Firecracker) to make it more effective across platforms.

Explained a bit more here about the architecture and why those choices were made: https://www.docker.com/blog/why-microvms-the-architecture-be...

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#299

Earlier quoted context omitted.

How would that work? You don't control github.com servers so your repo would never see the secret. edit: You may want to look into tokenizing proxies as the general application of this concept.

Your agent writes secret.txt with the placeholder, and the tokenizing proxy replaces it with the token, then the agent reads secret.txt

Couldn't it then just publish the mock in a public place... it would get replaced by the real secret.? How is this prevented

Re: Docker Sandboxes – Disposable, isolated sandboxes for AI agents

#300
post #199

Earlier quoted context omitted.

Docker containers are not enough isolation for anyone that cares about jailbreak scenarios. Only real alternative is to use microvms. My goto solution for this are apple/containers.

> Only real alternative is to use microvms. My goto solution for this are apple/containers. Why microVMs? I never ever run a container, AI harness or other, in something else than a full on VM. I could use a microVM but in any case I really don't see why I'd run a container on one of my bare metal OS: the place of a container is inside a VM (or microVM). Especially for AI harnesses where the threat of an escape is ve…

[deleted]
Post reply on HN