Show HN: Docker container for Claude Code with complete host isolation

2 nezhar 5 8/13/2025, 8:30:32 PM github.com ↗
I created a Docker container that packages Claude Code in a completely isolated environment. This solves the problem of wanting to try AI development tools without installing them directly on your system.

Credentials are persisted via bind mounts, with clean workspace access and easy removal when done experimenting. Perfect for developers who are curious about AI coding assistance but cautious about system-wide installations.

The container maintains all the functionality of Claude Code while keeping your host system pristine. Just docker run, authenticate once, and start coding with AI help. Remove the container later and there are no traces left behind.

The README on GitHub has examples for easy integration into existing projects. I welcome suggestions and feedback!

Comments (5)

roscas · 1d ago
Suggestion, to use --network=host so you can control to where it connects.

But if it is "a completely isolated environment" why does it need to login and get a token? It defeats isolation.

This should work like any other model, like we do with Ollama, download a model and it runs strict local with no network connections or tokens.

nezhar · 1d ago
You still need to connect to Anthropic and obtain an authorization token.

The isolation here refers to the workspace. Since you run the CLI in a container, the process can only access what you have mapped inside. This is helpful if you want to avoid issues like this: https://hackaday.com/2025/07/23/vibe-coding-goes-wrong-as-ai...

roscas · 1d ago
Ok. Thanks for the clarification. Still a good project, and many people like to use online services.

I prefer local models. All I use and used on the local model could be on an online, no secrets here. The speed is more than acceptable for a low end cpu+gpu.

I stil use Perplexity sometimes for more complex questions.

rreinold927 · 1d ago
This would be ideal if claude code supported local models, but is not the case right now
rreinold927 · 1d ago
This is a great way for security conscious developers to start using Claude