Skip to content

Commit

Permalink
fix: change LVMS base image to fix openssl conflicts
Browse files Browse the repository at this point in the history
Signed-off-by: Suleyman Akbas <sakbas@redhat.com>
  • Loading branch information
suleymanakbas91 committed May 3, 2024
1 parent a6ee9d8 commit 893359f
Showing 1 changed file with 6 additions and 17 deletions.
23 changes: 6 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down

0 comments on commit 893359f

Please sign in to comment.