Skip to content

Commit

Permalink
CRW-6054 Update Dockerfiles to use RHEL9 images.
Browse files Browse the repository at this point in the history
  • Loading branch information
SDawley committed Apr 29, 2024
1 parent efeea31 commit 91e4050
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions build/dockerfiles/brew.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@
#

# https://registry.access.redhat.com/rhel8/go-toolset
FROM rhel8/go-toolset:1.20.10-10 as builder
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 as builder
ENV GOPATH=/go/ \
CGO_ENABLED=1
USER root
WORKDIR /che-machine-exec/
COPY . .
# to test FIPS compliance, run https://github.com/openshift/check-payload#scan-a-container-or-operator-image against a built image
RUN adduser unprivilegeduser && \
RUN dnf -y install golang && \
adduser unprivilegeduser && \
GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \
mkdir -p /rootfs/tmp /rootfs/etc /rootfs/go/bin && \
# In the `scratch` you can't use Dockerfile#RUN, because there is no shell and no standard commands (mkdir and so on).
Expand All @@ -27,9 +28,9 @@ RUN adduser unprivilegeduser && \
cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin

# https://registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.9-1108 as runtime
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222 as runtime
COPY --from=builder /rootfs /
RUN microdnf install -y openssl; microdnf clean -y all
RUN dnf install -y openssl; microdnf clean -y all
USER unprivilegeduser
ENTRYPOINT ["/go/bin/che-machine-exec"]

Expand Down
4 changes: 2 additions & 2 deletions build/dockerfiles/rhel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#

# https://registry.access.redhat.com/ubi8/go-toolset
FROM registry.access.redhat.com/ubi8/go-toolset:1.20.10-10 as builder
FROM registry.access.redhat.com/ubi9/go-toolset:1.20.12-3.1713832665 as builder
ENV GOPATH=/go/ \
CGO_ENABLED=1
USER root
Expand All @@ -27,7 +27,7 @@ RUN adduser unprivilegeduser && \
cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin

# https://registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.9-1108 as runtime
FROM registry.access.redhat.com/ubi9-minimal:9.3-1612 as runtime
COPY --from=builder /rootfs /
RUN microdnf install -y openssl && \
microdnf -y update && \
Expand Down

0 comments on commit 91e4050

Please sign in to comment.