Skip to content

Commit

Permalink
[#2207] Add OpenSSL to runtime container
Browse files Browse the repository at this point in the history
  • Loading branch information
fax4ever authored Jan 24, 2025
1 parent 817a8a5 commit 2f3ed84
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ COPY go.sum go.sum
# and so that source changes don't invalidate our downloaded layer
RUN go mod download

# $rootfs will contain the libraries to manually export to the runtime container
ENV rootfs=/tmp/rootfs
RUN dnf install -y --installroot $rootfs --setopt install_weak_deps=false --nodocs openssl && \
dnf --installroot $rootfs clean all && \
rm -rf $rootfs/var/cache/* $rootfs/var/log/dnf* $rootfs/var/log/yum.*

# Copy the go source
COPY main.go main.go
COPY api/ api/
Expand All @@ -23,6 +29,10 @@ RUN CGO_ENABLED=1 GOOS=linux GO111MODULE=on \

FROM registry.access.redhat.com/ubi9/ubi-micro
COPY --from=build /bin/infinispan-operator /usr/local/bin/infinispan-operator
# Open SSL library is not directly used by our operator,
# but it may be invoked by OCP using FIPS with GoLang 1.22
COPY --from=build /tmp/rootfs/usr/bin/openssl /usr/bin/openssl
COPY --from=build /tmp/rootfs/lib64 /lib64
# Define GOTRACEBACK to mark this container as using the Go language runtime
# for `skaffold debug` (https://skaffold.dev/docs/workflows/debug/).
ENV GOTRACEBACK=single
Expand Down

0 comments on commit 2f3ed84

Please sign in to comment.