Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update base image to UBI9 #762

Merged
merged 1 commit into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG BUILDER_IMAGE
ARG BASE_IMAGE

FROM --platform=${BUILDPLATFORM} ${BUILDER_IMAGE} AS SRC

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Stage names should be lowercase

StageNameCasing: Stage name 'SRC' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${BUILDER_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Stage names should be lowercase

StageNameCasing: Stage name 'SRC' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${BUILDER_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Stage names should be lowercase

StageNameCasing: Stage name 'SRC' should be lowercase More info: https://docs.docker.com/go/dockerfile/rule/stage-name-casing/

Check warning on line 4 in Dockerfile.ubi

View workflow job for this annotation

GitHub Actions / Build

Default value for global ARG results in an empty or invalid base image name

InvalidDefaultArgInFrom: Default value for ARG ${BUILDER_IMAGE} results in empty or invalid base image name More info: https://docs.docker.com/go/dockerfile/rule/invalid-default-arg-in-from/

FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi8/ubi:latest} AS ubi
FROM ${BASE_IMAGE:-registry.access.redhat.com/ubi9/ubi:latest} AS ubi
ARG TARGETARCH


Expand All @@ -20,8 +20,7 @@
COPY ubi-build-files-${TARGETARCH}.txt /tmp
# Copy all the required files from the base UBI image into the image directory
# As the go binary is not statically compiled this includes everything needed for CGO to work, cacerts, tzdata and RH release files
RUN tar cf /tmp/files.tar -T /tmp/ubi-build-files-${TARGETARCH}.txt && tar xf /tmp/files.tar -C /image/ \
&& strip --strip-unneeded /image/usr/lib64/*[0-9].so
RUN tar cf /tmp/files.tar -T /tmp/ubi-build-files-${TARGETARCH}.txt && tar xf /tmp/files.tar -C /image/

# Generate a rpm database which contains all the packages that you said were needed in ubi-build-files-*.txt
RUN rpm --root /image --initdb \
Expand Down
7 changes: 1 addition & 6 deletions ubi-build-files-amd64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ root/buildinfo
etc/ssl/certs
etc/redhat-release
usr/share/zoneinfo
usr/lib64/ld-2.28.so
usr/lib64/ld-linux-x86-64.so.2
usr/lib64/libc-2.28.so
usr/lib64/libc.so.6
usr/lib64/libdl-2.28.so
usr/lib64/libdl.so.2
usr/lib64/libpthread-2.28.so
usr/lib64/libpthread.so.0
usr/lib64/libm-2.28.so
usr/lib64/libm.so.6
usr/lib64/libm.so.6
9 changes: 2 additions & 7 deletions ubi-build-files-arm64.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,8 @@ root/buildinfo
etc/ssl/certs
etc/redhat-release
usr/share/zoneinfo
usr/lib64/ld-2.28.so
usr/lib64/ld-linux-aarch64.so.1
usr/lib64/libc-2.28.so
usr/lib/ld-linux-aarch64.so.1
usr/lib64/libc.so.6
usr/lib64/libdl-2.28.so
usr/lib64/libdl.so.2
usr/lib64/libpthread-2.28.so
usr/lib64/libpthread.so.0
usr/lib64/libm-2.28.so
usr/lib64/libm.so.6
usr/lib64/libm.so.6
Loading