From 32204c00ba90306f95a1b4016d25d4af23d3fbb0 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 25 Aug 2020 11:53:08 -0700 Subject: [PATCH] Dockerfile.rhel: Use a RHEL-version-agnostic filename So we don't have a nominally-rhel7 Dockerfile building RHEL 8 images and also so we don't need to manually bump this filename when we bump RHEL versions. We've had a RHEL 8 base since a4044f4727 (Updating Dockerfile.rhel7 baseimages to mach ocp-build-data config, 2020-08-24, #442). Once consumers have updated, we can remove the backwards-compat symlink. --- Dockerfile.rhel | 14 ++++++++++++++ Dockerfile.rhel7 | 15 +-------------- 2 files changed, 15 insertions(+), 14 deletions(-) create mode 100644 Dockerfile.rhel mode change 100644 => 120000 Dockerfile.rhel7 diff --git a/Dockerfile.rhel b/Dockerfile.rhel new file mode 100644 index 000000000..34d01b15d --- /dev/null +++ b/Dockerfile.rhel @@ -0,0 +1,14 @@ +FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-openshift-4.6 AS builder +WORKDIR /go/src/github.com/openshift/cluster-version-operator +COPY . . +RUN hack/build-go.sh; \ + mkdir -p /tmp/build; \ + cp _output/linux/$(go env GOARCH)/cluster-version-operator /tmp/build/cluster-version-operator + +FROM registry.svc.ci.openshift.org/ocp/4.6:base +COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/ +COPY install /manifests +COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml /manifests/ +COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml /manifests/ +COPY bootstrap /bootstrap +ENTRYPOINT ["/usr/bin/cluster-version-operator"] diff --git a/Dockerfile.rhel7 b/Dockerfile.rhel7 deleted file mode 100644 index 34d01b15d..000000000 --- a/Dockerfile.rhel7 +++ /dev/null @@ -1,14 +0,0 @@ -FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-openshift-4.6 AS builder -WORKDIR /go/src/github.com/openshift/cluster-version-operator -COPY . . -RUN hack/build-go.sh; \ - mkdir -p /tmp/build; \ - cp _output/linux/$(go env GOARCH)/cluster-version-operator /tmp/build/cluster-version-operator - -FROM registry.svc.ci.openshift.org/ocp/4.6:base -COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/ -COPY install /manifests -COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusterversion.crd.yaml /manifests/ -COPY vendor/github.com/openshift/api/config/v1/0000_00_cluster-version-operator_01_clusteroperator.crd.yaml /manifests/ -COPY bootstrap /bootstrap -ENTRYPOINT ["/usr/bin/cluster-version-operator"] diff --git a/Dockerfile.rhel7 b/Dockerfile.rhel7 new file mode 120000 index 000000000..46cd531f6 --- /dev/null +++ b/Dockerfile.rhel7 @@ -0,0 +1 @@ +Dockerfile.rhel \ No newline at end of file