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
- Use apt-get instead of apt for better script compatibility - Add --no-install-recommends to reduce image size - Add cleanup to remove apt cache - Parameterize external tool versions with build args
| @@ -4,7 +4,8 @@ | ||
| 4 | 4 | ENV TZ="$TZ" |
| 5 | 5 | |
| 6 | 6 | # Install basic development tools and iptables/ipset |
| 7 | -RUN apt update && apt install -y less \ | |
| 7 | +RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| 8 | + less \ | |
| 8 | 9 | git \ |
| 9 | 10 | procps \ |
| 10 | 11 | sudo \ |
| @@ -19,7 +20,8 @@ | ||
| 19 | 20 | iproute2 \ |
| 20 | 21 | dnsutils \ |
| 21 | 22 | aggregate \ |
| 22 | - jq | |
| 23 | + jq \ | |
| 24 | + && apt-get clean && rm -rf /var/lib/apt/lists/* | |
| 23 | 25 | |
| 24 | 26 | # Ensure default node user has access to /usr/local/share |
| 25 | 27 | RUN mkdir -p /usr/local/share/npm-global && \ |
| @@ -42,10 +44,11 @@ | ||
| 42 | 44 | |
| 43 | 45 | WORKDIR /workspace |
| 44 | 46 | |
| 47 | +ARG GIT_DELTA_VERSION=0.18.2 | |
| 45 | 48 | RUN ARCH=$(dpkg --print-architecture) && \ |
| 46 | - wget "https://github.com/dandavison/delta/releases/download/0.18.2/git-delta_0.18.2_${ARCH}.deb" && \ | |
| 47 | - sudo dpkg -i "git-delta_0.18.2_${ARCH}.deb" && \ | |
| 48 | - rm "git-delta_0.18.2_${ARCH}.deb" | |
| 49 | + wget "https://github.com/dandavison/delta/releases/download/${GIT_DELTA_VERSION}/git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ | |
| 50 | + sudo dpkg -i "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \ | |
| 51 | + rm "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" | |
| 49 | 52 | |
| 50 | 53 | # Set up non-root user |
| 51 | 54 | USER node |
| @@ -58,7 +61,8 @@ | ||
| 58 | 61 | ENV SHELL=/bin/zsh |
| 59 | 62 | |
| 60 | 63 | # Default powerline10k theme |
| 61 | -RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v1.2.0/zsh-in-docker.sh)" -- \ | |
| 64 | +ARG ZSH_IN_DOCKER_VERSION=1.2.0 | |
| 65 | +RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v${ZSH_IN_DOCKER_VERSION}/zsh-in-docker.sh)" -- \ | |
| 62 | 66 | -p git \ |
| 63 | 67 | -p fzf \ |
| 64 | 68 | -a "source /usr/share/doc/fzf/examples/key-bindings.zsh" \ |
| @@ -3,7 +3,9 @@ | ||
| 3 | 3 | "build": { |
| 4 | 4 | "dockerfile": "Dockerfile", |
| 5 | 5 | "args": { |
| 6 | - "TZ": "${localEnv:TZ:America/Los_Angeles}" | |
| 6 | + "TZ": "${localEnv:TZ:America/Los_Angeles}", | |
| 7 | + "GIT_DELTA_VERSION": "0.18.2", | |
| 8 | + "ZSH_IN_DOCKER_VERSION": "1.2.0" | |
| 7 | 9 | } |
| 8 | 10 | }, |
| 9 | 11 | "runArgs": [ |