FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202107070256.p0.git.90dfcb8 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202107070256.p0.git.90dfcb8 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=90dfcb8 OS_GIT_VERSION=4.6.0-202107070256.p0.git.90dfcb8-90dfcb8 SOURCE_DATE_EPOCH=1623387940 SOURCE_GIT_COMMIT=90dfcb88c02d8f4f11ce12387b93add3a5d18468 SOURCE_GIT_TAG=v0.2.0-989-g90dfcb88 SOURCE_GIT_URL=https://github.com/openshift/machine-api-operator 
WORKDIR /go/src/github.com/openshift/machine-api-operator
COPY . .
RUN NO_DOCKER=1 make build

FROM openshift/ose-base:v4.6.0.20210707.033320
ENV __doozer=update BUILD_RELEASE=202107070256.p0.git.90dfcb8 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202107070256.p0.git.90dfcb8 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=90dfcb8 OS_GIT_VERSION=4.6.0-202107070256.p0.git.90dfcb8-90dfcb8 SOURCE_DATE_EPOCH=1623387940 SOURCE_GIT_COMMIT=90dfcb88c02d8f4f11ce12387b93add3a5d18468 SOURCE_GIT_TAG=v0.2.0-989-g90dfcb88 SOURCE_GIT_URL=https://github.com/openshift/machine-api-operator 
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/install manifests
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/bin/machine-api-operator .
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/bin/nodelink-controller .
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/bin/machine-healthcheck .
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/bin/machineset ./machineset-controller
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/bin/vsphere ./machine-controller-manager

LABEL \
        io.openshift.release.operator="true" \
        name="openshift/ose-machine-api-operator" \
        com.redhat.component="ose-machine-api-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Cloud Compute" \
        release="202107070256.p0.git.90dfcb8" \
        io.openshift.build.commit.id="90dfcb88c02d8f4f11ce12387b93add3a5d18468" \
        io.openshift.build.source-location="https://github.com/openshift/machine-api-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/machine-api-operator/commit/90dfcb88c02d8f4f11ce12387b93add3a5d18468" \
        version="v4.6.0"

