Rebuilding the container image via ./setup-yolo.sh --build=yes does not actually upgrade Claude Code to the latest npm version. Podman (and Docker) cache the RUN npm install -g @anthropic-ai/claude-code@latest layer, so unless the Dockerfile itself changes, the cached layer is reused and the old version persists.
This means users who rebuild after a new Claude Code release (e.g., one that adds support for newer models) silently get the stale cached version instead of the latest.
Steps to reproduce
- Build the image:
./setup-yolo.sh --build=yes
- Wait for a new
@anthropic-ai/claude-code release on npm
- Rebuild:
./setup-yolo.sh --build=yes
- Inside the container, run
claude --version — still shows the old version
Workaround
podman build --no-cache -t con-bomination-claude-code images/
Fix
Add a cache-busting ARG before the npm install layer and pass a unique value (epoch seconds) at build time so the layer is always re-evaluated when building via setup-yolo.sh.
Rebuilding the container image via
./setup-yolo.sh --build=yesdoes not actually upgrade Claude Code to the latest npm version. Podman (and Docker) cache theRUN npm install -g @anthropic-ai/claude-code@latestlayer, so unless the Dockerfile itself changes, the cached layer is reused and the old version persists.This means users who rebuild after a new Claude Code release (e.g., one that adds support for newer models) silently get the stale cached version instead of the latest.
Steps to reproduce
./setup-yolo.sh --build=yes@anthropic-ai/claude-coderelease on npm./setup-yolo.sh --build=yesclaude --version— still shows the old versionWorkaround
Fix
Add a cache-busting
ARGbefore thenpm installlayer and pass a unique value (epoch seconds) at build time so the layer is always re-evaluated when building viasetup-yolo.sh.