Skip to content

Commit

Permalink
CORS-2797: images: move container images to RHEL 9
Browse files Browse the repository at this point in the history
Use RHEL 9 as a base for all our container images.
  • Loading branch information
r4f4 committed Mar 21, 2024
1 parent d7bdcdf commit df83942
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion images/baremetal/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS="libvirt baremetal"
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand Down
8 changes: 4 additions & 4 deletions images/infrastructure-providers/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 make -C terraform

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macarmbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 make -C terraform

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 make -C terraform

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxarmbuilder
WORKDIR /go/src/github.com/openshift/installer
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=arm64 make -C terraform
Expand Down
2 changes: 1 addition & 1 deletion images/installer-altinfra/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# solutions. Once all providers have alternate implementations, this image will
# not be needed.

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS="altinfra"
ARG OPENSHIFT_INSTALL_CLUSTER_API=""
WORKDIR /go/src/github.com/openshift/installer
Expand Down
10 changes: 5 additions & 5 deletions images/installer-artifacts/Dockerfile.rhel
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,35 @@

FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macbuilder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_amd64 terraform/bin/darwin_amd64
RUN GOOS=darwin GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS macarmbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS macarmbuilder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/darwin_arm64 terraform/bin/darwin_arm64
RUN GOOS=darwin GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxbuilder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_amd64 terraform/bin/linux_amd64
RUN GOOS=linux GOARCH=amd64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS linuxarmbuilder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS linuxarmbuilder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
COPY --from=providers /go/src/github.com/openshift/installer/terraform/bin/linux_arm64 terraform/bin/linux_arm64
RUN GOOS=linux GOARCH=arm64 DEFAULT_ARCH="$(go env GOHOSTARCH)" hack/build.sh

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion images/installer/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers AS providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand Down
8 changes: 4 additions & 4 deletions images/installer/Dockerfile.upi.ci
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand All @@ -24,12 +24,12 @@ COPY --from=builder /go/src/github.com/openshift/installer/upi /var/lib/openshif
COPY --from=govc /govc /bin/govc

RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc && \
sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod\nbaseurl=https://packages.microsoft.com/rhel/8/prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >/etc/yum.repos.d/microsoft-prod.repo' && \
sh -c 'echo -e "[google-cloud-cli]\nname=Google Cloud CLI\nbaseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg\n https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" > /etc/yum.repos.d/google-cloud-sdk.repo'
sh -c 'echo -e "[packages-microsoft-com-prod]\nname=packages-microsoft-com-prod\nbaseurl=https://packages.microsoft.com/rhel/9/prod\nenabled=1\ngpgcheck=1\ngpgkey=https://packages.microsoft.com/keys/microsoft.asc" >/etc/yum.repos.d/microsoft-prod.repo' && \
sh -c 'echo -e "[google-cloud-cli]\nname=Google Cloud CLI\nbaseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64\nenabled=1\ngpgcheck=1\nrepo_gpgcheck=1\ngpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg\n https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg" > /etc/yum.repos.d/google-cloud-sdk.repo'

RUN yum update -y && \
yum install --setopt=tsflags=nodocs -y \
azure-cli-2.49.0-1.el8 \
azure-cli-2.49.0-1 \
gettext \
google-cloud-cli-447.0.0-1 \
gzip \
Expand Down
2 changes: 1 addition & 1 deletion images/libvirt/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS="libvirt"
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion images/libvirt/google-cloud-sdk.repo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[google-cloud-sdk]
name=Google Cloud SDK
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el8-x86_64
baseurl=https://packages.cloud.google.com/yum/repos/cloud-sdk-el9-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
Expand Down
2 changes: 1 addition & 1 deletion images/openstack/Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# It builds an image containing the openshift-install command as well as the openstack cli.
FROM registry.ci.openshift.org/ocp/4.16:installer-terraform-providers as providers

FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.21-openshift-4.16 AS builder
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.21-openshift-4.16 AS builder
ARG TAGS=""
WORKDIR /go/src/github.com/openshift/installer
COPY . .
Expand Down

0 comments on commit df83942

Please sign in to comment.