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

CRW-6054 Update Dockerfiles to use RHEL9 images. #282

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
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; dnf 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
Loading