From f886a1197f6fa2f75fc330df5e96fb431dae53ca Mon Sep 17 00:00:00 2001 From: Jiameng Wu Date: Sat, 30 May 2026 21:31:39 +0200 Subject: [PATCH] Bust Podman layer cache to ensure Claude Code upgrades on rebuild The `npm install -g @anthropic-ai/claude-code@latest` layer was cached by Podman, so rebuilding via `setup-yolo.sh --build=yes` silently reused the old version instead of fetching the latest. Add a CLAUDE_CACHEBUST build arg (set to epoch seconds) before the npm install layer so it is always re-evaluated. Co-Authored-By: Claude Opus 4.6 --- images/Dockerfile | 2 ++ setup-yolo.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/images/Dockerfile b/images/Dockerfile index a7ef605..fb1828f 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -220,6 +220,8 @@ RUN if [ "$EXTRA_ENTIRE" = "1" ]; then \ fi # Install Claude +# Cache-bust: pass --build-arg CLAUDE_CACHEBUST=$(date +%s) to force a fresh install +ARG CLAUDE_CACHEBUST= RUN npm install -g @anthropic-ai/claude-code@${CLAUDE_CODE_VERSION} # Use tini as init process to properly reap zombie processes diff --git a/setup-yolo.sh b/setup-yolo.sh index 9559fc7..93e3afa 100755 --- a/setup-yolo.sh +++ b/setup-yolo.sh @@ -155,7 +155,7 @@ elif [ "$BUILD_MODE" = "yes" ] || [ "$IMAGE_EXISTS" = false ]; then echo TZ=$(timedatectl show --property=Timezone --value 2>/dev/null || echo "UTC") - BUILD_ARGS=(--build-arg "TZ=$TZ") + BUILD_ARGS=(--build-arg "TZ=$TZ" --build-arg "CLAUDE_CACHEBUST=$(date +%s)") if [ -n "$EXTRA_PACKAGES" ]; then BUILD_ARGS+=(--build-arg "EXTRA_PACKAGES=$EXTRA_PACKAGES") fi