fix(images): build when Ubuntu upgrades a base package
Installing the job container's tools upgrades base packages once Ubuntu has newer ones, and the purge does not downgrade them, so the version check failed every image. Kaniko now empties the root filesystem and unpacks the base image before its first snapshot (--pre-cleanup), so the versions no longer matter. Extra packages and files no package owns still fail the job. With the filesystem emptied, a failed build can leave no rm for the last step, so the build step empties the credential file itself. The images also kept the base image's package versions. Each Dockerfile now upgrades them, and the base digests move to the newest published. Refs #508 Assisted-by: Claude Code
This commit is contained in:
1 parent
e446e1e09a
commit
9127ac565a
8 files changed
+51
-41
No files matched your search
@@ -24,14 +24,15 @@
|
||||
# stay below Cloudflare's 100 MB request-body limit on git.rkdr.net. The build stage prints the
|
||||
# compressed size of each directory it copies.
|
||||
|
||||
FROM ubuntu:26.04@sha256:d66b366dac61b575bee2aef07e9c26e8070096fbe84a3d4d3eb0da069b5d76db AS os
|
||||
FROM ubuntu:26.04@sha256:a8417def3fc37c2d8cf513fe69ef871d415a45a27847779fae461c5047710edd AS os
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# python3 and python3-venv only bootstrap uv in the build stage; ca-certificates serve the
|
||||
# install a job runs when a pull request changes a pin; git lets the selector diff the checkout.
|
||||
# apt lists are removed in the same layer.
|
||||
# The upgrade brings in updates newer than the base image. apt lists are removed in the same layer.
|
||||
RUN apt-get update \
|
||||
&& apt-get upgrade -y --with-new-pkgs --no-install-recommends \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates git python3 python3-venv \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
Reference in new issue
Block a user