surshar / claude-code
Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.
Built by Anthropic · github.com/anthropics
| 1 | # syntax=docker/dockerfile:1 |
| 2 | |
| 3 | # Runtime image for `claude gateway`. |
| 4 | # |
| 5 | # This image does NOT build the binary. It expects a prebuilt native |
| 6 | # linux-x64 `claude` executable in the build context — the public Claude Code |
| 7 | # release binary, which includes the `gateway` subcommand. setup.sh places it |
| 8 | # at ./claude (downloading it from the public release endpoint and verifying |
| 9 | # it against the release manifest if missing). Override CLAUDE_BINARY to |
| 10 | # point at a different path. |
| 11 | # |
| 12 | # Build (with the binary at ./claude; otherwise add --build-arg CLAUDE_BINARY=<path>): |
| 13 | # docker build --platform=linux/amd64 --provenance=false -t claude-gateway . |
| 14 | # |
| 15 | # Run: |
| 16 | # docker run --rm -p 8080:8080 \ |
| 17 | # -v "$PWD/gateway.yaml:/etc/claude/gateway.yaml:ro" \ |
| 18 | # -e OIDC_CLIENT_SECRET -e GATEWAY_JWT_SECRET -e GATEWAY_POSTGRES_URL \ |
| 19 | # claude-gateway |
| 20 | |
| 21 | ARG CLAUDE_BINARY=./claude |
| 22 | |
| 23 | # distroless/cc provides glibc + libstdc++ (required by the Bun-compiled |
| 24 | # native binary). The :nonroot tag runs as uid/gid 65532. |
| 25 | FROM gcr.io/distroless/cc-debian12:nonroot |
| 26 | |
| 27 | ARG CLAUDE_BINARY |
| 28 | COPY --chmod=0755 ${CLAUDE_BINARY} /usr/local/bin/claude |
| 29 | |
| 30 | ENV CLAUDE_CONFIG_DIR=/tmp/.claude |
| 31 | |
| 32 | EXPOSE 8080 |
| 33 | USER nonroot |
| 34 | |
| 35 | ENTRYPOINT ["/usr/local/bin/claude", "gateway", "--config", "/etc/claude/gateway.yaml"] |