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

OCPBUGS-33244: Change LVMS base image to fix openssl conflicts #624

Merged
merged 1 commit into from
May 3, 2024
Merged
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
22 changes: 5 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,15 @@ 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 dnf update -y && \
dnf install --nodocs --noplugins -y \
util-linux \
e2fsprogs \
xfsprogs \
glibc && \
microdnf clean all
dnf clean all

WORKDIR /
COPY --from=builder /workspace/lvms .
Expand Down