Skip to content

Pull base images on every build and reference BUILD_DATE in the update - #2

Merged
aaaaaaaalex merged 2 commits into
mainfrom
fix/build-pull-and-cache-bust
Sep 30, 2026
Merged

aaaaaaaalex merged 2 commits into
mainfrom
fix/build-pull-and-cache-bust

Conversation

@aaaaaaaalex

Copy link
Copy Markdown
Collaborator

Follow-up to #1, addressing its review.

  • Pull the base images on every build. Without --pull, a build reuses any local copy of ubi9-minimal:latest without checking the registry, so on a machine that has built before, the image can sit on an older base than the registry's. The Makefile build now passes --pull.
  • Reference BUILD_DATE in the package update. Docker re-runs a RUN when an ARG declared ahead of it changes, but other builders — including podman, which the Makefile uses when it is installed — need the value used in the instruction itself. The update now echoes it, so it re-runs on every build whichever builder is used.

Verification

Built with Docker via the Makefile:

  • The base lookup now goes to the registry (1.0s, previously 0.0s from the local copy), and the image is built on the registry's current ubi9-minimal (build date 2026-09-30).
  • The same BUILD_DATE twice leaves the update cached; a new value makes it re-run.
  • No package updates are pending in the built image.

Podman is not available here, so the podman path is untested.

🤖 Generated with Claude Code

aaaaaaaalex and others added 2 commits September 30, 2026 14:58
Without --pull, a build reuses any local copy of a floating base tag, so
the image can be built on a base older than the registry's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alex O'Regan <alex.oregan@tigera.io>
Docker re-runs a RUN when an ARG declared ahead of it changes, but other
builders need the value used in the instruction itself. Referencing it
makes the update re-run on every build whichever builder is used.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Alex O'Regan <alex.oregan@tigera.io>
Copilot AI balanced review requested due to automatic review settings September 30, 2026 13:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@aaaaaaaalex
aaaaaaaalex merged commit bf896bb into main Sep 30, 2026
1 check failed
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