https://github.com/tmck-code/claude-container
For running Claude Code
https://github.com/tmck-code/claude-container
Last synced: 16 days ago
JSON representation
For running Claude Code
- Host: GitHub
- URL: https://github.com/tmck-code/claude-container
- Owner: tmck-code
- License: bsd-3-clause
- Created: 2026-03-20T02:34:14.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2026-04-02T06:37:21.000Z (about 2 months ago)
- Last Synced: 2026-04-02T09:22:52.254Z (about 2 months ago)
- Language: Dockerfile
- Size: 29.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# claude-container
Run Claude Code safely in a containerized environment.
## Commands
- build the Docker image:
```shell
docker build -t claude-code .
```
- run container
- bind-mounting the current directory and
- your Claude credentials, to avoid re-auth on every run
- with max security (no bind-mounting of the `.venv` dir, and no `GITHUB_TOKEN` env var):
```bash
docker run -it \
-v $HOME/.claude.json:/home/claude/.claude.json \
-v $HOME/.claude/:/home/claude/.claude/ \
-v $PWD/pyproject.toml:/app/pyproject.toml \
-v $PWD/uv.lock:/app/uv.lock \
-v $PWD/my-code-dir:/app/my-code-dir \ # <-- replace with your code dir
claude-code \
bash -c 'claude --dangerously-skip-permissions'
```
- more convenience (bind-mounting the whole dir including `.venv.` and passing `GITHUB_TOKEN` env var):
```bash
docker run -it \
-v $HOME/.claude.json:/home/claude/.claude.json
-v $HOME/.claude/:/home/claude/.claude/ \
-v $PWD:/app \
-e GITHUB_TOKEN=$(gh auth token) \
claude-code \
bash -c 'claude --dangerously-skip-permissions'
```