Skip to content

Commit

Permalink
RHCLOUD-34908 Bump base images to ubi9 (RedHatInsights#2906)
Browse files Browse the repository at this point in the history
  • Loading branch information
gwenneg authored Sep 6, 2024
1 parent 2645227 commit 4fd5adc
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 51 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/base-image-auto-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ jobs:
- name: Set up skopeo
run: sudo apt-get install -y skopeo
- name: Check change
run: skopeo inspect docker://registry.access.redhat.com/ubi8/openjdk-21-runtime:latest | grep Digest > .baseimage
run: skopeo inspect docker://registry.access.redhat.com/ubi9/openjdk-21-runtime:latest | grep Digest > .baseimage
- name: Do change if the digest changed
run: |
git config user.name 'Update-a-Bot'
git config user.email '[email protected]'
git add -A
git commit -m "Update ubi8/openjdk-21-runtime:latest image digest" || echo "No changes to commit"
git commit -m "Update ubi9/openjdk-21-runtime:latest image digest" || echo "No changes to commit"
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
title: 'Update ubi8/openjdk-21-runtime:latest image digest'
title: 'Update ubi9/openjdk-21-runtime:latest image digest'
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-aggregator.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -DskipTests -pl :notifications-aggregator -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-backend.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -DskipTests -pl :notifications-backend -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-drawer.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-drawer -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-email.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-email -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
# Add RedHat CAs on OS truststore (check https://certs.corp.redhat.com/ for more details)
COPY --from=build /home/jboss/recipients-resolver/src/main/resources/mtls-ca-validators.crt /etc/pki/ca-trust/source/anchors/mtls-ca-validators.crt
RUN update-ca-trust
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-google-chat.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-google-chat -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-microsoft-teams.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-microsoft-teams -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-servicenow.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-servicenow -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-slack.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-slack -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-splunk.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-splunk -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-connector-webhook.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-connector-webhook -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-engine.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -DskipTests -pl :notifications-engine -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
USER jboss

ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
Expand Down
6 changes: 2 additions & 4 deletions docker/Dockerfile.notifications-recipients-resolver.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,18 @@
###

# Build the project
FROM registry.access.redhat.com/ubi8/openjdk-21:latest AS build
FROM registry.access.redhat.com/ubi9/openjdk-21:latest AS build
USER root
COPY . /home/jboss
WORKDIR /home/jboss
RUN ./mvnw clean package -Dmaven.test.skip -Dcheckstyle.skip -pl :notifications-recipients-resolver -am --no-transfer-progress

# Build the container
FROM registry.access.redhat.com/ubi8/openjdk-21-runtime:latest
FROM registry.access.redhat.com/ubi9/openjdk-21-runtime:latest

# Update the base image packages
USER root
RUN microdnf update --refresh --nodocs && microdnf clean all
# Temporary workaround for packages affected by a CVE and not needed to run our app which is why we're removing them from the base image
RUN rpm -e --nodeps platform-python-setuptools
# Add RedHat CAs on OS truststore (check https://certs.corp.redhat.com/ for more details)
COPY --from=build /home/jboss/recipients-resolver/src/main/resources/mtls-ca-validators.crt /etc/pki/ca-trust/source/anchors/mtls-ca-validators.crt
RUN update-ca-trust
Expand Down

0 comments on commit 4fd5adc

Please sign in to comment.