Skip to content

Add claude-code base image#4205

Merged
tasuku43 merged 7 commits intomasterfrom
add-claude-code-runner
Apr 14, 2026
Merged

Add claude-code base image#4205
tasuku43 merged 7 commits intomasterfrom
add-claude-code-runner

Conversation

@tasuku43
Copy link
Copy Markdown
Contributor

@tasuku43 tasuku43 commented Apr 14, 2026

Summary

  • Add claude-code/ base Docker image with Claude Code CLI and common dependencies pre-installed
  • General-purpose base image: FROM chatwork/claude-code for K8s CronJobs, CI, interactive work, etc.
  • No ENTRYPOINT/CMD — jobs provide their own command via K8s command/args or docker run
  • Runs as non-root user (claude)
  • Claude Code CLI version pinned and auto-tracked via variant mod (GCS latest endpoint)

Included tools

Category Tools
Core Claude Code CLI, curl, ca-certificates, git, bash, less
Data processing jq, yq, unzip
Cloud / CI awscli, gh (GitHub CLI), python3
Security gpg, openssh-client

Test plan

  • docker build succeeds locally
  • docker run ... claude --version returns expected version
  • docker run ... whoami returns claude (non-root)
  • make test (dgoss) passes — 9/9, 0 failed

🤖 Generated with Claude Code

tasuku43 and others added 6 commits April 14, 2026 12:00
Base Docker image for running Claude Code in containers.
Includes Claude Code CLI, gh, yq, and common dependencies.
Designed to be used as FROM base by teams building their own runner images.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pin Claude Code CLI to 2.1.105 via ARG and pass to installer
- Add variant.mod/lock for automated version tracking via npm registry
- Remove debug-only packages: vim-tiny, strace, dnsutils, iputils-ping,
  procps, net-tools, python3-pip
- Add gpg and openssh-client for binary verification and SSH git access

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add Dockerfile.arm64 symlink for multi-arch CI builds
- Switch yq install from pinned version to latest release
- Change variant mod source from npm registry to GCS latest endpoint
- Remove hand-written variant.lock, regenerated via mod up

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Jobs provide their own command via K8s command/args or docker run.
No common init needed at this point; can be added later if required.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Not just a runner - a general-purpose base image for Claude Code.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tasuku43 tasuku43 changed the title Add claude-code-runner base image Add claude-code base image Apr 14, 2026
Create dedicated 'claude' user and install Claude Code CLI under
/home/claude/.local/bin. System tools (yq, gh, etc.) remain in
system paths, accessible to all users.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tasuku43
Copy link
Copy Markdown
Contributor Author

Local verification results

Build

$ docker build -t chatwork/claude-code:latest .
Successfully tagged chatwork/claude-code:latest

Smoke test

$ docker run --rm chatwork/claude-code claude --version
2.1.105 (Claude Code)

$ docker run --rm chatwork/claude-code whoami
claude

Non-root user (claude) で動作確認済み。

dgoss test (make test)

File: /home/claude/.local/bin/claude: exists: matches expectation: true
Command: gpg --version: exit-status: matches expectation: 0
Command: python3 --version: exit-status: matches expectation: 0
Command: git --version: exit-status: matches expectation: 0
Command: jq --version: exit-status: matches expectation: 0
Command: yq --version: exit-status: matches expectation: 0
Command: gh --version: exit-status: matches expectation: 0
Command: claude --version: exit-status: matches expectation: 0
Command: claude --version: stdout: matches expectation: ["2.1.105"]

Total Duration: 0.043s
Count: 9, Failed: 0, Skipped: 0

Copy link
Copy Markdown
Collaborator

@mumoshu mumoshu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@tasuku43 tasuku43 merged commit 2e4eb4b into master Apr 14, 2026
4 checks passed
@tasuku43 tasuku43 deleted the add-claude-code-runner branch April 14, 2026 04:10
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.

2 participants