Back to browse
GitHub Repository

Single command. Isolated environment. No setup required.

12 starsTypeScript

Claude Code Container – Zero-Config Docker Isolation for Claude Code

by Luxusio·Mar 8, 2026·1 point·0 comments

AI Analysis

●●SolidSolve My ProblemShip It

Wraps Claude Code in Docker with zero config, but devcontainers and manual isolation already exist.

Strengths
  • Auto-mounts SSH keys, forwards env vars, and proxies localhost — solves real Docker+Claude friction points.
  • Single `ccc` command with no Dockerfile or config file needed — dramatically lowers barrier vs devcontainers.
  • Smart session lifecycle with lock files and auto-cleanup prevents stale containers and orphaned processes.
Weaknesses
  • Solves a Claude Code-specific UX problem, not a general container orchestration gap.
  • Depends on Claude Code adoption; limited audience compared to general-purpose Docker tools.
Target Audience

Developers using Claude Code who want safe, isolated execution without manual Docker setup.

Similar To

devcontainers · Docker Compose · Nix

Post Description

Claude Code's `--dangerouslySkipPermissions` flag is incredibly productive, but it's called "dangerous" for good reason. In practice it has deleted home directories, wiped database files, and read sensitive files completely unrelated to the project. But the default permission prompts interrupt flow constantly -- you end up spending more time approving edits than actually working.

The obvious fix is containers. But every existing approach has painful tradeoffs: - Dockerfile per project: you're now maintaining infrastructure just to use your AI assistant - devcontainer: complex config, slow to set up, breaks differently per IDE - Manual docker run: env vars don't forward, SSH keys aren't available, clipboard copy/paste stops working inside Claude sessions, and localhost:8080 from your host is unreachable from inside the container

I wanted full isolation with zero configuration. ccc (claude-code-container) handles all of this automatically, without any configuration: npm install -g claude-code-container ccc # that's it

What it does: - Creates a per-project container (named by path hash, so --continue/--resume work correctly) - Forwards host env vars, locale, timezone automatically - Mounts SSH keys and SSH agent (git push just works) - Transparent localhost proxy so Claude can reach your host's dev servers at localhost:3000, :8080, etc. even from inside the container - Clipboard works normally in Claude sessions - mise integration for per-project Node/Python/Java/Go versions - Container auto-stops when the last session exits - Chromium + chrome-devtools MCP pre-configured: Claude can open a browser, navigate pages, take screenshots, run JavaScript, and interact with your web app autonomously -- no extra setup

The transparent localhost proxy was the hardest part -- it uses iptables on Linux and a userspace proxy on macOS/Windows (Docker Desktop doesn't support --network host), with automatic fallback to host.docker.internal.

GitHub: https://github.com/Luxusio/claude-code-container

Would love feedback, especially from people who've tried other approaches to this problem.

Similar Projects

Developer Tools●●Solid

Run Claude Code, Codex, and more with auto-approval in a Container

Maps dangerous permission flags from multiple agents into one --ikwid switch to skip permissions.

Solve My ProblemShip It
nezhar
202mo ago