Run Claude Code in a Docker container. No Node.js installation required. Uses peterkuczera/claude-code on Docker Hub, automatically updated with new Claude Code releases.
claude --helpThat's it. No npm install -g, no Node.js version conflicts.
Run this one-liner:
curl -fsSL https://raw.githubusercontent.com/peterkuczera/docker-claude-code/refs/heads/main/install.sh | bashThen run Claude Code from any project directory:
cd ~/my-project
claudeThe claude script runs a Docker container with:
- Your config files (
~/.claude,~/.claude.json) mounted so API keys and settings persist - Your current directory mounted so Claude Code can access your project files
- Your user ID so files created have correct ownership
The latest image is automatically pulled, so you always get the newest Claude Code version.
claude # Interactive mode
claude --help # Show help
claude --version # Show version
claude "fix the bug" # Run a prompt directlyRunning from system directories blocked
The script blocks mounting /, /etc, /usr, etc. Run from a user directory instead.
For contributors or those wanting to customize the image:
git clone https://github.com/peterkuczera/docker-claude-code.git
cd docker-claude-code
./bin/buildThen install the wrapper to use your local build:
DOCKER_IMAGE=claude-code:latest ./install.shSee CLAUDE.md for development details and architecture.
docker-claude-code is released under the MIT License.