FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=a2175e587b007272f26305fe7d8b603c49e8f1fc SOURCE_DATE_EPOCH=1568397667 BUILD_VERSION=v4.1.18 SOURCE_GIT_URL=https://github.com/openshift/machine-config-operator SOURCE_GIT_TAG=a2175e5 BUILD_RELEASE=201909201915
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .
RUN WHAT=machine-config-controller ./hack/build-go.sh; \
    mkdir -p /tmp/build; \
    cp /go/src/github.com/openshift/machine-config-operator/_output/linux/$(go env GOARCH)/machine-config-controller /tmp/build/machine-config-controller

FROM openshift/ose-base:v4.1.18.20190920.191508
ENV SOURCE_GIT_COMMIT=a2175e587b007272f26305fe7d8b603c49e8f1fc SOURCE_DATE_EPOCH=1568397667 BUILD_VERSION=v4.1.18 SOURCE_GIT_URL=https://github.com/openshift/machine-config-operator SOURCE_GIT_TAG=a2175e5 BUILD_RELEASE=201909201915
COPY --from=builder /tmp/build/machine-config-controller /usr/bin/
COPY templates /etc/mcc/templates
ENTRYPOINT ["/usr/bin/machine-config-controller"]

LABEL \
        com.redhat.component="ose-machine-config-controller-container" \
        io.openshift.build.commit.url="https://github.com/openshift/machine-config-operator/commit/a2175e587b007272f26305fe7d8b603c49e8f1fc" \
        version="v4.1.18" \
        name="openshift/ose-machine-config-controller" \
        io.openshift.build.commit.id="a2175e587b007272f26305fe7d8b603c49e8f1fc" \
        release="201909201915" \
        io.openshift.build.source-location="https://github.com/openshift/machine-config-operator"

