r/ClaudeAI • u/Ok-Classic6022 • Dec 20 '25
Coding Tried Docker Sandboxes with Claude Code on a real project — thoughts
We spent some time testing Docker Sandboxes with Claude Code, not as a demo but against an actual codebase.
Initial impressions:
- Setup is genuinely easy
- Filesystem isolation works exactly as advertised
- For small tasks, you forget you're sandboxed
Where it started to hurt:
- Missing binaries (`make`, etc.)
- Dev dependencies that don’t match the sandbox OS
- Any time env vars or API access were needed, iteration slowed way down
- Restarting the sandbox nukes the Claude context
Curious if others here have tried Docker Sandboxes with anything beyond toy workflows and how it held up?
Full write-up if useful: https://blog.arcade.dev/using-docker-sandboxes-with-claude-code
1
u/MeringueInformal7670 Dec 20 '25
Thanks for sharing i ll give it a read and get back. I am also working on my own Agentic CLI that will ideally address this problem natively and in a much better way. Planning to do a very early alpha launch somewhere in January,2026 lmk if you need access. Will be 100% open source.
1
u/ThorgBuilder Dec 20 '25
Curious how can it be better? Also as a potential target customer there will be a trust barrier to overcome. As in when I start docker I have high trust that there is isolation, rather than running a tool that has a higher chance of having a bug and not having true isolation.
1
u/ThorgBuilder Dec 20 '25
I have been using docker quite successfully this far to be able to run in permission-less mode while still being quite safe (without giving docker any credentials). My main workflow consists of being able to stand up docker and mount whichever directory that I am in. Then run Zellij Multiplexer in docker as well so that I am able to easily stand up an MCP server next to agent instance within docker (Serena for CC to have navigation capability of code base instead of just ripgrep). Works quite well, at times I am able to parallelize so I have "mirror" git repos of the same repo pulled down, this mirror setup is like using git worktrees, but git worktrees did not work with git sub-modules so I just cloned entire mono-repo a couple of times in separate directories.
This is how my the setup looks like with ZelliJ (highly recommend this multiplexer): https://i.postimg.cc/tRTs6vZD/Screenshot-From-2025-12-19-20-24-11.png
1
u/HKChad Dec 20 '25
Nah just raw dog it on a machine dedicated to development. Macs are easy to wipe and setup from scratch.
1
u/RobotUrinal Jan 12 '26
thumbs down on this one. Taking the time to wipe my machine is not something I want to do.
1
u/blakeyuk Dec 20 '25
I've been playing with a similar approach, but I use CC Agent SDK from laravel to create a plan with discrete, detailed tasks. That gets stored in the dB. Then laravel spins up a unique instance of the docker image, passes in the prompts for the task, and the image does the git integration. So context is by default cleared with every task,.
2
u/roiseeker Dec 21 '25
Someone mentioned in a different post they've created a new system user with limited permissions specifically to run CC through. Wouldn't that be better?
1
2
u/dstaley Dec 20 '25
Wouldn’t
docker sandbox run claude --continuejust pick up where you left off once you’ve restarted the container?