Skip to content

Commit e63cff3

Browse files
authored
CRW-7880 Update Machineexec to use UBI9 (#683)
1 parent 91cf608 commit e63cff3

File tree

3 files changed

+22
-24
lines changed

3 files changed

+22
-24
lines changed

devspaces-machineexec/build/dockerfiles/brew.Dockerfile

+8-9
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
# Red Hat, Inc. - initial API and implementation
1010
#
1111

12-
# https://registry.access.redhat.com/rhel9-2-els/rhel
13-
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1405 as builder
12+
# https://registry.access.redhat.com/ubi9/go-toolset
13+
FROM registry.redhat.io/ubi9/go-toolset:1.22.7-1733160835 as builder
1414
ENV GOPATH=/go/ \
1515
CGO_ENABLED=1
1616
USER root
1717
WORKDIR /che-machine-exec/
1818
COPY . .
1919
# to test FIPS compliance, run https://github.com/openshift/check-payload#scan-a-container-or-operator-image against a built image
20-
RUN dnf -y install golang && \
21-
adduser unprivilegeduser && \
20+
RUN adduser unprivilegeduser && \
2221
GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \
2322
mkdir -p /rootfs/tmp /rootfs/etc /rootfs/go/bin && \
2423
# In the `scratch` you can't use Dockerfile#RUN, because there is no shell and no standard commands (mkdir and so on).
@@ -27,12 +26,12 @@ RUN dnf -y install golang && \
2726
cp -rf /etc/passwd /rootfs/etc && \
2827
cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin
2928

30-
# https://registry.access.redhat.com/rhel9-2-els/rhel
31-
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1405 as runtime
29+
# https://registry.access.redhat.com/ubi9-minimal
30+
FROM registry.redhat.io/ubi9-minimal:9.5-1731593028 as runtime
3231
COPY --from=builder /rootfs /
33-
RUN dnf install -y openssl && \
34-
dnf -y update && \
35-
dnf clean -y all
32+
RUN microdnf install -y openssl && \
33+
microdnf -y update && \
34+
microdnf clean -y all
3635

3736
USER unprivilegeduser
3837
ENTRYPOINT ["/go/bin/che-machine-exec"]

devspaces-machineexec/build/dockerfiles/rhel.Dockerfile

+8-9
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
# Red Hat, Inc. - initial API and implementation
1010
#
1111

12-
# https://registry.access.redhat.com/rhel9-2-els/rhel
13-
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1405 as builder
12+
# https://registry.access.redhat.com/ubi9/go-toolset
13+
FROM registry.redhat.io/ubi9/go-toolset:1.22.7-1733160835 as builder
1414
ENV GOPATH=/go/ \
1515
CGO_ENABLED=1
1616
USER root
1717
WORKDIR /che-machine-exec/
1818
COPY . .
1919
# to test FIPS compliance, run https://github.com/openshift/check-payload#scan-a-container-or-operator-image against a built image
20-
RUN dnf -y install golang && \
21-
adduser unprivilegeduser && \
20+
RUN adduser unprivilegeduser && \
2221
GOOS=linux go build -mod=vendor -a -ldflags '-w -s' -a -installsuffix cgo -o che-machine-exec . && \
2322
mkdir -p /rootfs/tmp /rootfs/etc /rootfs/go/bin && \
2423
# In the `scratch` you can't use Dockerfile#RUN, because there is no shell and no standard commands (mkdir and so on).
@@ -27,12 +26,12 @@ RUN dnf -y install golang && \
2726
cp -rf /etc/passwd /rootfs/etc && \
2827
cp -rf /che-machine-exec/che-machine-exec /rootfs/go/bin
2928

30-
# https://registry.access.redhat.com/rhel9-2-els/rhel
31-
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1405 as runtime
29+
# https://registry.access.redhat.com/ubi9-minimal
30+
FROM registry.redhat.io/ubi9-minimal:9.5-1731593028 as runtime
3231
COPY --from=builder /rootfs /
33-
RUN dnf install -y openssl && \
34-
dnf -y update && \
35-
dnf clean -y all
32+
RUN microdnf install -y openssl && \
33+
microdnf -y update && \
34+
microdnf clean -y all
3635

3736
USER unprivilegeduser
3837
ENTRYPOINT ["/go/bin/che-machine-exec"]

devspaces-machineexec/content_sets.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# likely this will be x86_64 and ppc64le initially.
1313
---
1414
x86_64:
15-
- rhel-9-for-x86_64-baseos-eus-rpms__9_DOT_2
16-
- rhel-9-for-x86_64-appstream-eus-rpms__9_DOT_2
15+
- rhel-9-for-x86_64-baseos-rpms
16+
- rhel-9-for-x86_64-appstream-rpms
1717
s390x:
18-
- rhel-9-for-s390x-baseos-eus-rpms__9_DOT_2
19-
- rhel-9-for-s390x-appstream-eus-rpms__9_DOT_2
18+
- rhel-9-for-s390x-baseos-rpms
19+
- rhel-9-for-s390x-appstream-rpms
2020
ppc64le:
21-
- rhel-9-for-ppc64le-baseos-eus-rpms__9_DOT_2
22-
- rhel-9-for-ppc64le-appstream-eus-rpms__9_DOT_2
21+
- rhel-9-for-ppc64le-baseos-rpms
22+
- rhel-9-for-ppc64le-appstream-rpms

0 commit comments

Comments
 (0)