feat(install): add --no-cache flag and version tag for built image #12

Merged
claudiomaradonna merged 2 commits from feat/install-no-cache-and-version-tag into main 2026-04-30 17:57:46 +02:00

Summary

  • Add --no-cache flag to the podman build invocation in the install script so the image can be rebuilt cleanly without reusing layers.
  • Tag the built image with the actually installed Claude Code version, so the image tag reflects the binary it contains.

Test plan

  • Run the install script and verify the build runs without using cached layers when expected.
  • Inspect the resulting image and confirm it is tagged with the installed Claude Code version.
## Summary - Add `--no-cache` flag to the podman build invocation in the install script so the image can be rebuilt cleanly without reusing layers. - Tag the built image with the actually installed Claude Code version, so the image tag reflects the binary it contains. ## Test plan - [ ] Run the install script and verify the build runs without using cached layers when expected. - [ ] Inspect the resulting image and confirm it is tagged with the installed Claude Code version.
Reinstalling the image previously required either editing the script
or using the Makefile to bypass Podman's layer cache. The new flag
propagates --no-cache to `podman build` so a full rebuild can be
forced from the install entry point.
After building the image, run the freshly built container with the
entrypoint overridden to read `claude --version` and apply an extra
tag like `claude-code:2.1.123` alongside `:latest`. This makes the
installed Claude Code version discoverable from `podman images` and
lets users keep multiple versions side-by-side.

If the user passes an explicit tag via `--image name:tag`, only that
tag is honored — the dual-tag is skipped to respect the explicit
choice. The custom-tag detection looks at the last path segment so
registry hosts with a port (e.g. `localhost:5000/foo`) are not
mistaken for tagged images.

If version detection fails the script logs a warning and continues:
the `:latest` image is already built and usable.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
claudiomaradonna/claude-jail!12
No description provided.