Skip to content

Commit

Permalink
Update base image to UBI9 and refine build file lists for amd64 and a…
Browse files Browse the repository at this point in the history
…rm64
  • Loading branch information
SheryarButt committed Oct 9, 2024
1 parent 53ab40a commit c78e7b8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Dockerfile.ubi
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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 @@ RUN mkdir /image && \
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

0 comments on commit c78e7b8

Please sign in to comment.