Last active
April 17, 2026 15:14
-
-
Save karthiks/59d41f62000edcff611eda7ab4725323 to your computer and use it in GitHub Desktop.
Dockerfile - Config Claude Code in Docker container to connect to CCR AI Gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM node:20-bookworm-slim | |
| # 1. Install System Deps | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| bash curl git vim jq ca-certificates \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Workspace Setup (Still root) | |
| WORKDIR /workspace | |
| # 3. Install Everything as Root | |
| # Install Claude, and CCR AI Gateway | |
| RUN npm install -g @musistudio/claude-code-router && \ | |
| curl -fsSL https://claude.ai/install.sh | bash | |
| # 4. Configure CCR AI Gateway by symlinking a file in project directory to its expected location at User scope location. | |
| RUN mkdir -p ~/.claude-code-router && ln -sf /workspace/ccr-config/config.json ~/.claude-code-router/config.json | |
| RUN ccr start & | |
| # 5. Git And Shell Configs (No "safe.directory" issues because we are root) | |
| RUN git config --global core.fileMode false && \ | |
| git config --global core.autocrlf true && \ | |
| # 6. Environment Configuration | |
| ENV TERM=xterm-256color \ | |
| COLORTERM=truecolor \ | |
| CONTAINER=docker | |
| ENTRYPOINT ["bash"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment