From 893359f44dc6acb10b084e0fc324a9608701049d Mon Sep 17 00:00:00 2001 From: Suleyman Akbas Date: Fri, 3 May 2024 16:40:04 +0200 Subject: [PATCH] fix: change LVMS base image to fix openssl conflicts Signed-off-by: Suleyman Akbas --- Dockerfile | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index a185c17b7..60347fb14 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,27 +23,16 @@ COPY internal/ internal/ # Build RUN GOOS=$TARGETOS GOARCH=$TARGETARCH go build -mod=vendor --ldflags "-s -w" -a -o lvms cmd/main.go -FROM --platform=$TARGETPLATFORM registry.access.redhat.com/ubi9/ubi-minimal:9.3 - -# We use CentOS Stream 9 as our source for e2fsprogs here so that we can offer a fully open source version for development here. -# This allows users without Red Hat Subscriptions (e.g. on a Fedora Workstation) to build and test LVMS. -# Note that we do NOT provide Support for any images built from this Dockerfile. The authoritative source for LVMS is the -# official Red Hat Container Catalog at https://catalog.redhat.com/software/containers/search?gs&q=lvms4%20operator -# which are built with Red Hat builds of the e2fsprogs package which is only available via Red Hat Subscription. -RUN curl https://mirror.stream.centos.org/9-stream/BaseOS/$(arch)/os/Packages/centos-gpg-keys-9.0-23.el9.noarch.rpm > centos-gpg-keys-9.0-23.el9.noarch.rpm && \ - rpm -i centos-gpg-keys-9.0-23.el9.noarch.rpm && \ - rm -f centos-gpg-keys-9.0-23.el9.noarch.rpm -RUN curl https://mirror.stream.centos.org/9-stream/BaseOS/$(arch)/os/Packages/centos-stream-repos-9.0-23.el9.noarch.rpm > centos-stream-repos-9.0-23.el9.noarch.rpm && \ - rpm -i centos-stream-repos-9.0-23.el9.noarch.rpm && \ - rm -f centos-stream-repos-9.0-23.el9.noarch.rpm - -RUN microdnf update -y && \ - microdnf install --nodocs --noplugins -y \ +FROM --platform=$TARGETPLATFORM registry.ci.openshift.org/ocp/4.16:base-rhel9 + +RUN yum update -y && \ + yum install -y \ util-linux \ e2fsprogs \ xfsprogs \ glibc && \ - microdnf clean all + yum clean all && \ + rm -rf /var/cache/yum WORKDIR / COPY --from=builder /workspace/lvms .