FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=e17ddba2f24258f7ab7bb0eb034208cd3a0d1bab SOURCE_DATE_EPOCH=1566678070 BUILD_VERSION=v4.1.14 SOURCE_GIT_URL=https://github.com/openshift/machine-config-operator SOURCE_GIT_TAG=e17ddba BUILD_RELEASE=201908291507
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.14.20190829.150756
ENV SOURCE_GIT_COMMIT=e17ddba2f24258f7ab7bb0eb034208cd3a0d1bab SOURCE_DATE_EPOCH=1566678070 BUILD_VERSION=v4.1.14 SOURCE_GIT_URL=https://github.com/openshift/machine-config-operator SOURCE_GIT_TAG=e17ddba BUILD_RELEASE=201908291507
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/e17ddba2f24258f7ab7bb0eb034208cd3a0d1bab" \
        version="v4.1.14" \
        name="openshift/ose-machine-config-controller" \
        io.openshift.build.commit.id="e17ddba2f24258f7ab7bb0eb034208cd3a0d1bab" \
        release="201908291507" \
        io.openshift.build.source-location="https://github.com/openshift/machine-config-operator"

