Sign inSign up

gendosu/claude-code-docker

By gendosu

•Updated 10 months ago

claude-code-docker

Image
3

10K+

gendosu/claude-code-docker repository overview

⁠claude-code-docker

A Docker image for Claude Code that allows you to run Claude Code in a container environment.

⁠Features

  • Based on Node.js 22.11.0
  • Pre-installed with @anthropic-ai/claude-code
  • Multi-platform support (linux/amd64, linux/arm64)

⁠Usage

⁠Using Docker Compose
  1. Set environment variables:
GITHUB_TOKEN=your_github_token
GITHUB_ID=your_github_id
  1. Start the container:
docker compose up --build
⁠Using Docker
docker run --rm -it \
  -e GITHUB_TOKEN \
  -w `pwd` \
  -v `pwd`:`pwd` \
  -v claude-code-docker-node-versions:/home/appuser/.nodenv/versions \
  gendosu/claude-code-docker:latest
⁠Example Configuration for Claude Desktop MCP Server

Add the following configuration to your Claude Desktop config file (claude_desktop_config.json) to use the Claude Code feature:

{
  "mcpServers": {
    "claude-code": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "GITHUB_TOKEN",
        "-w",
        "/path/to/your/workspace",
        "-v",
        "/path/to/your/workspace:/path/to/your/workspace",
        "-v",
        "claude-code-docker-node-versions:/home/appuser/.nodenv/versions",
        "gendosu/claude-code-docker:latest",
        "mcp",
        "serve"
      ],
      "env": {
        "NODENV_VERSION": "22.11.0",
        "GITHUB_TOKEN": "<Your GitHub Token>"
      }
    }
  }
}

Configuration details:

  • command: Specify the Docker command
  • args:
    • -w: Specify the working directory
    • -v: Specify volume mount between host and container
    • mcp serve: Start the Claude Code MCP server

Note: This configuration is specific to Claude Desktop. VSCode requires a different configuration method.

⁠GitHub Container Registry

This image is available on GitHub Container Registry:

docker pull gendosu/claude-code-docker:latest

⁠License

MIT

⁠Author

gendosu

Tag summary

Content type

Image

Digest

sha256:344c97f96…

Size

213.2 MB

Last updated

10 months ago

docker pull gendosu/claude-code-docker