v2.101.0 Docker build failed (run 24992556558) because Dockerfile:51 installs nodejs from Ubuntu jammy apt (Node v12.22.9), but @anthropic-ai/claude-code requires Node ≥18. Optional chaining in install.cjs throws SyntaxError: Unexpected token '.' on Node 12.
Two coupled changes in Dockerfile
1. Replace apt-installed nodejs with NodeSource Node 20 LTS
- Drop
nodejs and npm from the existing apt-get install block (line 51-52)
- Before
npm install -g, add NodeSource setup:
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y --no-install-recommends nodejs
(NodeSource bundles a current npm, no separate npm package needed)
2. Pin claude-code version
- Change line 53:
npm install -g @anthropic-ai/claude-code
- To:
npm install -g @anthropic-ai/[email protected]
Verification
docker build -t pilot:test . succeeds locally
docker run --rm pilot:test claude --version prints 2.1.123 (Claude Code)
- After merge, retag or re-run the Docker workflow to publish the v2.101.x image
Out of scope
- Doc snippets under
docs/content/** (user-facing examples, leave unpinned)
- Helm chart (no Node baked in)
v2.101.0 Docker build failed (run 24992556558) because
Dockerfile:51installsnodejsfrom Ubuntu jammy apt (Node v12.22.9), but@anthropic-ai/claude-coderequires Node ≥18. Optional chaining ininstall.cjsthrowsSyntaxError: Unexpected token '.'on Node 12.Two coupled changes in
Dockerfile1. Replace apt-installed nodejs with NodeSource Node 20 LTS
nodejsandnpmfrom the existing apt-get install block (line 51-52)npm install -g, add NodeSource setup:2. Pin claude-code version
npm install -g @anthropic-ai/claude-codenpm install -g @anthropic-ai/[email protected]Verification
docker build -t pilot:test .succeeds locallydocker run --rm pilot:test claude --versionprints2.1.123 (Claude Code)Out of scope
docs/content/**(user-facing examples, leave unpinned)