This image aims to containerize Claude Code, supporting full air-gapped (offline) functionality.
1.4K
This image containerizes Claude Code for use with local LLMs, supporting full air-gapped (offline) functionality.
Download and run the devstral-small-2 model on a local GPU:
docker run --rm -it --gpus=all -v ./models:/root/.ollama -v ./code:/code --name local_claude muritiku/local_claude:latest devstral-small-2
This creates two folders:
code - contains the code generated by Claudemodels - stores the downloaded model filesOnce the models are cached, you can migrate the Docker image and the models directory to a network-isolated environment. All operations are then performed entirely offline.
Create a script named claude in $HOME/.local/bin (or any directory in your $PATH):
#!/usr/bin/env bash
# script location: $HOME/.local/bin/claude
docker run --rm -it --gpus=all -v ~/.claude_docker:/root/.claude -v ~/.claude_models:/root/.ollama -v $(pwd):/code --name local_claude muritiku/local_claude:latest devstral-small-2
Make the script executable:
chmod +x $HOME/.local/bin/claude
Now you can run Claude from any folder to work with the code in your current directory. This also works with the official Anthropic VSCode plugin (anthropic.claude-code) in CLI mode.
Claude Code data will be cached in ~/.claude_docker, and models in ~/.claude_models. This ensures that your data and settings persist between sessions.
--gpus=all for GPU acceleration--gpus=all flag to run on CPU (slower)This project relies on:
Content type
Image
Digest
sha256:aa5628488…
Size
3.6 GB
Last updated
6 months ago
docker pull muritiku/local_claude