FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=545465beeeb6d99fd890c6b3bc5dba5789a38b4c SOURCE_DATE_EPOCH=1567607163 BUILD_VERSION=v4.1.16 SOURCE_GIT_URL=https://github.com/openshift/machine-api-operator SOURCE_GIT_TAG=v0.2.0-233-g545465b BUILD_RELEASE=201909100604
WORKDIR /go/src/github.com/openshift/machine-api-operator
COPY . .
RUN NO_DOCKER=1 make build

FROM openshift/ose-base:v4.1.16.20190910.060423
ENV SOURCE_GIT_COMMIT=545465beeeb6d99fd890c6b3bc5dba5789a38b4c SOURCE_DATE_EPOCH=1567607163 BUILD_VERSION=v4.1.16 SOURCE_GIT_URL=https://github.com/openshift/machine-api-operator SOURCE_GIT_TAG=v0.2.0-233-g545465b BUILD_RELEASE=201909100604
COPY --from=builder /go/src/github.com/openshift/machine-api-operator/owned-manifests owned-manifests
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 .

LABEL \
        com.redhat.component="ose-machine-api-operator-container" \
        name="openshift/ose-machine-api-operator" \
        io.openshift.build.source-location="https://github.com/openshift/machine-api-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/machine-api-operator/commit/545465beeeb6d99fd890c6b3bc5dba5789a38b4c" \
        version="v4.1.16" \
        io.openshift.build.commit.id="545465beeeb6d99fd890c6b3bc5dba5789a38b4c" \
        release="201909100604"

