Skip to content

fix: address PR #317 code review findings#321

Closed
geoffjay wants to merge 3 commits intomainfrom
fix/pr-317-code-review-findings
Closed

fix: address PR #317 code review findings#321
geoffjay wants to merge 3 commits intomainfrom
fix/pr-317-code-review-findings

Conversation

@geoffjay
Copy link
Copy Markdown
Owner

Summary

  • 🔴 Blocking fix: Replace ENTRYPOINT ["claude"] with CMD ["claude"] to prevent DockerBackend's cmd: vec!["claude"] from combining into claude claude, which would cause the container to exit immediately
  • Remove unused AS base alias, redundant mkdir -p/chown after --move-home, and add missing .PHONY targets
  • Pin @anthropic-ai/claude-code version via a build ARG for reproducible SHA-tagged images
  • Add comment in CI noting arm64 is untested beyond a successful buildx push

Test plan

  • Build the image locally with make docker-build-claude and verify docker run --rm agentd-claude:latest --version works
  • Confirm DockerBackend can start a container and docker exec into it successfully (no claude claude double-invocation)
  • Verify make fmt-fix and make docker-build-claude-multiarch are recognized as phony targets

🤖 Generated with Claude Code

geoffjay and others added 3 commits March 10, 2026 22:42
…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>
- 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>
@geoffjay geoffjay closed this Mar 11, 2026
@geoffjay geoffjay deleted the fix/pr-317-code-review-findings branch March 11, 2026 14:10
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.67%. Comparing base (9b8b578) to head (9811961).
⚠️ Report is 8 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #321   +/-   ##
=======================================
  Coverage   44.67%   44.67%           
=======================================
  Files          79       79           
  Lines        7199     7199           
=======================================
  Hits         3216     3216           
  Misses       3983     3983           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant