190 comments

[ 3.2 ms ] story [ 127 ms ] thread
Reminds me of sandboxy - https://github.com/apple/containerization/tree/main/examples...

Also if your thing doesn't work with `pi` out of the box, then low effort

Just put the following to your `.config/sandboxy/agents/pi.json`

{ "allowedHosts": [ ".anthropic.com", ".claude.com", ".pi.dev", "npm.org", ".npmjs.org", ".github.com", ".githubusercontent.com", ".pypi.org", ".pythonhosted.org" ], "baseImage": "docker.io\/library\/node:22", "displayName": "Pi", "environmentVariables": [ "IS_SANDBOX=1" ], "installCommands": [ "npm install -g --ignore-scripts @earendil-works/pi-coding-agent", "npm install -g global-agent" ], "launchCommand": [ "pi" ], "mounts": [ { "containerPath": "\/root\/.pi", "hostPath": "~\/.pi", "readOnly": false } ] }⏎

Ah let's see, do they still want you to LOGIN, in order to use a local dev tool? Yes, yes they do. No thanks Docker. You can keep your buzzword reasoning as to why this is needed.
The one thing I wonder about is how you enforce the usage of Docker Sandboxes vs running the agent on the host directly, apart from scanning machines for binaries
been using this for a while - works great! Has also had a lot of updates over the past year so worth checking out again if you tried it a while ago
Docker management will fail their tech at every opportunity.
Like many people, I suspect, I used Claude to write my own agent sandbox that suits my needs very well. Investing my time in a propietary product has become a hard sell.
Why developers will never pay for their tools.
[dead]
TO me, that's the important distinction: sandboxing limits what the agent can do but it doesn't necessarily enforce that the agent must run inside the sandbox. You need a separate control layer to enforce that boundary.
The linked page implies there is no linux support, I wonder why. It's there in the docs if you hunt for it.
Open source alternative with podman support and local telemetry collection https://github.com/VibePod/vibepod-cli
This is not really an alternative if you care about the security of your host system. Docker Sandbox uses micro VMs for a reasons.
If any AI company was doing serious engineering isolated containers would have been a prerequisite to using their tools.
I am not sure I understand, how is this different from a devcontainer or other similar techniques?

On another topic, can't help but notice that "leading coding agents" somehow does not include Pi.

About the missing native support for Pi, I opened this issue long ago in case you want to add some pressure: https://github.com/docker/sbx-releases/issues/34

To work around that limitation I came up with this https://github.com/shaftoe/sbx-template-pi

So essentially you can get latest Pi/Node pulling from that image:

`sbx run -t ghcr.io/shaftoe/sbx-template-pi:latest shell`

Like others here I'm also saddened by the login requirement but at the moment this is the best UX I could find for running sandboxed agents, the "kit/mixin" concepts are neat and I make use of them too: https://github.com/shaftoe/sbx-template-pi#stacking-the-extr...

I got excited for this not because this didn't exist before, but because Docker putting their weight on this would imply a broader adoption and better integration in the industry. I am sad that they are asking for a login here though, which doesn't make any sense to me.
(comment deleted)
I know some people want to run their agents when their computer is off, but I imagine a solution like this will be much more common than paying for a remote sandbox (i.e on fly.io or exe.dev), especially because it'll be free.

Though, they need to remove the login requirement.

Agreed! I think the best user experience is:

    1. You can run sandboxes locally
    2. You can control them securely over the internet, for when you're on the go
    3. You can migrate them to cloud VMs if you want
If I can toot my own horn, I'm trying to build that :)

Still early and the local sandboxes are experimental right now

https://github.com/gofixpoint/amika

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

> Each agent runs inside a dedicated microVM with your dev environment

What's a "microVM" and what's the security model here compared to using real virtual machines with actual constraints on breakouts?

Is it marketing fluff?

Incus/LXD has had VM's for a long time now.

    incus launch images:ubuntu/26.04 my-ubuntu-vm --vm
    incus exec my-ubuntu-vm -- bash
“microvms” are real vms but the hypervisor and vm (guest kernel) shed most of the hardware / device emulation, support, and discovery which makes traditional VMs look / feel like real computers, as well as most guest interactions. This gives them extremely low overhead.

Firecracker is designed to start a VM in under 125ms and 5MB. Netbsd advertises that you can direct-boot a MICROVM kernel configuration in under 10ms.

There are many devs that have little to no experience of Linux, like the hundreds of thousands of .Net and Java CRUD devs in enterprise companies using Windows.

There is a need for a Docker desktop like GUI for this market.

An Ubuntu Server VM, like the ones started by Incus, use at least 512 MB of RAM per instance. If you spawn 10 sandbox VMs, you already pay 5 GB RAM just to sit there idle. You also pay a CPU cost, you have 10 kernels managing stuff, but arguably it doesn't matter that much given CPU core counts.

I use something in between - a single Ubuntu VM, into which I spawn multiple Incus LXC containers for the agents. The containers only use 50 MB or so per instance (separate systemd, ...). This way I pay the VM RAM tax only once, and the agents are still contained inside the VM if they manage to escape the LXC containers.

This is what I do. Nice benefit is it lets me passthrough my GPU and share it between multiple containers. Incus is awesome.
Your example is not complete, you have to show how it will run claude/codex, you have to do extra things to install run and mount folders there, this one does that with less config, also with this agents can run docker, lxd doesn't allow you to do that
Wow, I hope one day Linux will be able to support the exclusive MacOs/Windows technology of Docker Sandboxes.

(it's in the doc, but kinda strange to not see some instructions on the main page, probably distro related)

Whoah. I took for granted it'd work on Linux.
I’d rather use another open source solution that doesn’t require a signup, and less likely to get rugpulled.

There is no reason to require a login for creating local mini sandboxes.

If you’re on Apple, native solutions like “container-machine init” come built in and are pretty good, if you’ll only be on Apple hardware.

So it's basically a container with a fancy name, innit?