A Docker container for running risky, long-running agentic tasks in isolation. Includes Claude Code, Gemini CLI (as a fallback for blocked sites), and all the customizations from this repo.
# Build the image (from the container directory, or anywhere with the Dockerfile)
docker build -t claude-code-container -f Dockerfile .
# Run
docker run -it claude-code-container
The Dockerfile pulls the latest claude-code-tips repo from GitHub during build, so no local files are needed.
After starting the container, you need to authenticate both CLIs manually:
claude
Follow the prompts to log in with your Anthropic account. This opens a browser URL - copy it to your host browser if needed.
gemini
Follow the prompts to log in with your Google account.
gemini-3-pro-preview modelTo avoid re-authenticating Gemini every time, you can mount the credential directory:
docker run -it \
-v ~/.gemini:/home/claude/.gemini \
claude-code-container
Note: Claude Code credentials are stored in macOS Keychain, so you’ll need to re-auth Claude each time (or use ANTHROPIC_API_KEY env var if you have one).
Mount your project directory:
docker run -it \
-v /path/to/your/project:/home/claude/workspace \
claude-code-container
Then cd /home/claude/workspace and start Claude Code there.
To get the latest changes:
docker build --no-cache -t claude-code-container -f Dockerfile .The --no-cache flag ensures it pulls the latest from GitHub.