Conversation
…n image Create docker/claude-code/Dockerfile based on node:22-slim with: - Claude Code CLI installed via npm - Common dev tools (git, curl, jq, openssh-client) - Non-root 'agent' user (UID 1000) matching DockerBackend defaults - /workspace working directory with safe.directory configured - claude entrypoint, no secrets baked in Add GitHub Actions workflow (.github/workflows/docker-claude-code.yml): - Triggers on Dockerfile changes, releases, and manual dispatch - Builds multi-platform images (linux/amd64, linux/arm64) - Pushes to ghcr.io/geoffjay/agentd-claude with latest, SHA, and semver tags - Uses buildx layer caching for fast rebuilds Add Makefile with docker-build-claude target and standard Rust targets. Add .dockerignore to keep build context minimal. Closes #286 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The node:22-slim base image already has a `node` user at UID 1000. Use groupmod/usermod to rename it to `agent` instead of groupadd/useradd which fails with exit code 4 (UID already exists). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code Review: PR #317 — Dockerfile and CI pipeline for Claude Code execution imageThe overall structure is solid: minimal base image, non-root user, GHA cache, correct registry auth gating, and multi-platform support. One blocking issue and a handful of minor suggestions. 🔴 Blocking: ENTRYPOINT in Dockerfile conflicts with DockerBackend's CMDThe Dockerfile ends with: ENTRYPOINT ["claude"]But
Fix: remove the Alternatively, if the intent is to always keep containers alive for exec regardless of the CMD, consider a supervisor process (e.g. 🟡 Non-blocking:
|
| # | Severity | Issue |
|---|---|---|
| 1 | 🔴 Blocking | ENTRYPOINT + backend CMD combine to run claude claude, container exits immediately |
| 2 | 🟡 Non-blocking | AS base alias unused (single-stage build) |
| 3 | 🟡 Non-blocking | @anthropic-ai/claude-code not version-pinned |
| 4 | 🟡 Non-blocking | mkdir -p /home/agent after --move-home is redundant |
| 5 | 🟡 Non-blocking | fmt-fix and docker-build-claude-multiarch missing from .PHONY |
| 6 | 🟡 Non-blocking | CI verify step only confirms amd64 |
geoffjay
left a comment
There was a problem hiding this comment.
Inline comments on specific lines — see the overall review summary in the PR comments.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #317 +/- ##
=======================================
Coverage 44.67% 44.67%
=======================================
Files 79 79
Lines 7199 7199
=======================================
Hits 3216 3216
Misses 3983 3983 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Replace ENTRYPOINT with CMD to prevent `claude claude` invocation when DockerBackend sets cmd via create_container (blocking issue) - Remove unused `AS base` alias from single-stage build - Pin @anthropic-ai/claude-code version via build ARG for reproducibility - Remove redundant mkdir/chown after usermod --move-home - Add fmt-fix and docker-build-claude-multiarch to .PHONY in Makefile - Add comment noting arm64 verify gap in CI workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace ENTRYPOINT with CMD to prevent `claude claude` invocation when DockerBackend sets cmd via create_container (blocking issue) - Remove unused `AS base` alias from single-stage build - Pin @anthropic-ai/claude-code version via build ARG for reproducibility - Remove redundant mkdir/chown after usermod --move-home - Add fmt-fix and docker-build-claude-multiarch to .PHONY in Makefile - Add comment noting arm64 verify gap in CI workflow Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
docker/claude-code/Dockerfilebased onnode:22-slimwith Claude Code CLI, git, curl, jq, openssh-client, non-rootagentuser (UID 1000), and/workspaceworkdirghcr.io/geoffjay/agentd-claudewithlatest, SHA, and semver tagsMakefilewithdocker-build-claudetarget and standard Rust build targets.dockerignoreto keep build context minimalTest plan
make help)DEFAULT_IMAGEconstant incrates/wrap/src/docker.rsdocker run --rm agentd-claude:latest --versionreturns Claude Code versionCloses #286
🤖 Generated with Claude Code