From 1acd708efebe806fc7c3ea5648f0733e5e7dec22 Mon Sep 17 00:00:00 2001 From: Michael McCune Date: Mon, 31 Aug 2020 14:28:43 -0400 Subject: [PATCH] Add Dockerfile.rhel to match build configuration in ocp-build-data This change adds a new Dockerfile.rhel file to control builds that target rhel. It is inspired by the automatically generated patches which ensure that build files match what is in the [ocp-build-data repository](https://github.com/openshift/ocp-build-data/tree/openshift-4.6-rhel-8/images) used for producing release artifacts. After this change merges, the configuration files in https://github.com/openshift/release/blob/master/ci-operator/config/openshift/cluster-api-provider-aws/openshift-cluster-api-provider-aws-master.yaml and https://github.com/openshift/ocp-build-data/blob/openshift-4.6/images/ose-aws-machine-controllers.yml should be updated with the new dockerfile path. --- Dockerfile.rhel | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Dockerfile.rhel diff --git a/Dockerfile.rhel b/Dockerfile.rhel new file mode 100644 index 0000000000..0032b21227 --- /dev/null +++ b/Dockerfile.rhel @@ -0,0 +1,10 @@ +FROM registry.svc.ci.openshift.org/ocp/builder:rhel-8-golang-openshift-4.6 AS builder +WORKDIR /go/src/sigs.k8s.io/cluster-api-provider-aws +COPY . . +# VERSION env gets set in the openshift/release image and refers to the golang version, which interfers with our own +RUN unset VERSION \ + && GOPROXY=off NO_DOCKER=1 make build + +FROM registry.svc.ci.openshift.org/ocp/4.6:base +COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-aws/bin/machine-controller-manager / +COPY --from=builder /go/src/sigs.k8s.io/cluster-api-provider-aws/bin/termination-handler /