Skip to content

Commit

Permalink
CRW-6054 Update Server to use rhel-els 9.2 (#566)
Browse files Browse the repository at this point in the history
* CRW-6054 Update dockerfiles to use rhel-els and update sync to not overwrite them with upstream versions.

* Switch to using brew.Dockerfile so it doesn't get overwritten by upstream

* Update to use eus content repos for FIPS compliance.
  • Loading branch information
SDawley authored May 21, 2024
1 parent 903b550 commit f2b6a52
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2018-2023 Red Hat, Inc.
# Copyright (c) 2018-2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
Expand All @@ -10,13 +10,13 @@
#

# https://access.redhat.com/containers/?tab=tags#/registry.access.redhat.com/ubi8-minimal
FROM registry.access.redhat.com/ubi8-minimal:8.9-1161
FROM registry.redhat.io/rhel9-2-els/rhel:9.2-1222
USER root
ENV CHE_HOME=/home/user/devspaces
ENV JAVA_HOME=/usr/lib/jvm/jre
RUN microdnf install java-17-openjdk-headless tar gzip shadow-utils findutils && \
microdnf update -y && \
microdnf -y clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages" && \
RUN dnf -y install java-17-openjdk-headless tar gzip shadow-utils findutils && \
dnf update -y && \
dnf -y clean all && rm -rf /var/cache/yum && echo "Installed Packages" && rpm -qa | sort -V && echo "End Of Installed Packages" && \
adduser -G root user && mkdir -p /home/user/devspaces
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
Expand Down
44 changes: 17 additions & 27 deletions devspaces-server/build/scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ echo ".github/
dockerfiles/
assets/branding/
build/scripts/sync.sh
build/dockerfiles
/container.yaml
/content_sets.*
/cvp.yml
Expand Down Expand Up @@ -165,33 +166,22 @@ else
fi
generateFetchArtifactsPNCYaml

# NOTE: upstream Dockerfile is in non-standard path (not build/dockerfiles/Dockerfile) because project has multiple container builds
sed ${SOURCEDIR}/build/dockerfiles/Dockerfile -r \
-e 's@/home/user/eclipse-che@/home/user/devspaces@g' \
`# insert logic to unpack asset-*.tgz` \
-e 's@ADD eclipse-che .+@# see fetch-artifacts-pnc.yaml\nCOPY artifacts/assembly-main.tar.gz /tmp/assembly-main.tar.gz\nRUN tar xzf /tmp/assembly-main.tar.gz --strip-components=1 -C /home/user/devspaces; rm -f /tmp/assembly-main.tar.gz\n@g' \
-e 's@chmod g\\+w /home/user/cacerts@chmod 777 /home/user/cacerts@g' \
> ${TARGETDIR}/Dockerfile
cat << EOT >> ${TARGETDIR}/Dockerfile
ENV SUMMARY="Red Hat OpenShift Dev Spaces server container" \\
DESCRIPTION="Red Hat OpenShift Dev Spaces server container" \\
PRODNAME="devspaces" \\
COMPNAME="server-rhel8"
LABEL summary="\$SUMMARY" \\
description="\$DESCRIPTION" \\
io.k8s.description="\$DESCRIPTION" \\
io.k8s.display-name="\$DESCRIPTION" \\
io.openshift.tags="\$PRODNAME,\$COMPNAME" \\
com.redhat.component="\$PRODNAME-\$COMPNAME-container" \\
name="\$PRODNAME/\$COMPNAME" \\
version="${DS_VERSION}" \\
pnc_artifact_id="${pnc_artifact_id}" \\
pnc_build_id="${pnc_build_id}" \\
license="EPLv2" \\
maintainer="Nick Boldt <[email protected]>" \\
io.openshift.expose-services="" \\
usage=""
EOT
sed_in_place() {
SHORT_UNAME=$(uname -s)
if [ "$(uname)" == "Darwin" ]; then
sed -i '' "$@"
elif [ "${SHORT_UNAME:0:5}" == "Linux" ]; then
sed -i "$@"
fi
}

sed_in_place -r \
`# Update DevSpaces version for Dockerfile` \
-e "s/version=.*/version=\"$DS_VERSION\" \\\/" \
-e "s/pnc_artifact_id=.*/pnc_artifact_id=\"$pnc_artifact_id\" \\\/" \
-e "s/pnc_build_id=.*/pnc_build_id=\"$pnc_build_id\" \\\/" \
"${TARGETDIR}"/build/dockerfiles/brew.Dockerfile

echo "Converted Dockerfile"

# add ignore for the tarball in mid and downstream
Expand Down
12 changes: 6 additions & 6 deletions devspaces-server/content_sets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
# likely this will be x86_64 and ppc64le initially.
---
x86_64:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
- rhel-9-for-x86_64-baseos-eus-rpms__9_DOT_2
- rhel-9-for-x86_64-appstream-eus-rpms__9_DOT_2
s390x:
- rhel-8-for-s390x-baseos-rpms
- rhel-8-for-s390x-appstream-rpms
- rhel-9-for-s390x-baseos-eus-rpms__9_DOT_2
- rhel-9-for-s390x-appstream-eus-rpms__9_DOT_2
ppc64le:
- rhel-8-for-ppc64le-baseos-rpms
- rhel-8-for-ppc64le-appstream-rpms
- rhel-9-for-ppc64le-baseos-eus-rpms__9_DOT_2
- rhel-9-for-ppc64le-appstream-eus-rpms__9_DOT_2

0 comments on commit f2b6a52

Please sign in to comment.