From 7f7340d0abee17ce190a51b343bf5ca847d36de9 Mon Sep 17 00:00:00 2001 From: Nick Boldt Date: Thu, 20 Jul 2023 10:10:52 -0300 Subject: [PATCH] feat: CRW-4582 switch to ubi8 minimal downstream w/ openssl installed (#261) Change-Id: I4ce761b33179e04250efc1e3c71b9cbc7fe2e09a Signed-off-by: Nick Boldt --- build/dockerfiles/brew.Dockerfile | 5 +++-- build/dockerfiles/rhel.Dockerfile | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build/dockerfiles/brew.Dockerfile b/build/dockerfiles/brew.Dockerfile index d3f821b3..5d7c3181 100644 --- a/build/dockerfiles/brew.Dockerfile +++ b/build/dockerfiles/brew.Dockerfile @@ -13,7 +13,6 @@ FROM rhel8/go-toolset:1.19.10-3 as builder ENV GOPATH=/go/ \ CGO_ENABLED=1 - USER root WORKDIR /che-machine-exec/ COPY . . @@ -27,8 +26,10 @@ RUN adduser unprivilegeduser && \ cp -rf /etc/passwd /rootfs/etc && \ cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin -FROM scratch +# https://registry.access.redhat.com/ubi8-minimal +FROM registry.access.redhat.com/ubi8-minimal:8.8-1014 as runtime COPY --from=builder /rootfs / +RUN microdnf install -y openssl; microdnf clean -y all USER unprivilegeduser ENTRYPOINT ["/go/bin/che-machine-exec"] diff --git a/build/dockerfiles/rhel.Dockerfile b/build/dockerfiles/rhel.Dockerfile index 45a2e19d..3bb571ed 100644 --- a/build/dockerfiles/rhel.Dockerfile +++ b/build/dockerfiles/rhel.Dockerfile @@ -26,8 +26,10 @@ RUN adduser unprivilegeduser && \ cp -rf /etc/passwd /rootfs/etc && \ cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin -FROM scratch +# https://registry.access.redhat.com/ubi8-minimal +FROM registry.access.redhat.com/ubi8-minimal:8.8-1014 as runtime COPY --from=builder /rootfs / +RUN microdnf install -y openssl; microdnf clean -y all USER unprivilegeduser ENTRYPOINT ["/go/bin/che-machine-exec"]