FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=b2ee2cf36a40ae41dc98d1e880faa8279e0feba2 SOURCE_GIT_TAG=b2ee2cf SOURCE_DATE_EPOCH=1560283426
WORKDIR /go/src/github.com/openshift/machine-config-operator
COPY . .
RUN WHAT=machine-config-operator ./hack/build-go.sh; \
    mkdir -p /tmp/build; \
    cp /go/src/github.com/openshift/machine-config-operator/_output/linux/$(go env GOARCH)/machine-config-operator /tmp/build/machine-config-operator

FROM openshift/ose-base:v4.1.3.20190618.153745
ENV SOURCE_GIT_COMMIT=b2ee2cf36a40ae41dc98d1e880faa8279e0feba2 SOURCE_GIT_TAG=b2ee2cf SOURCE_DATE_EPOCH=1560283426
COPY --from=builder /tmp/build/machine-config-operator /usr/bin/
COPY install /manifests
ENTRYPOINT ["/usr/bin/machine-config-operator"]

LABEL \
        com.redhat.component="ose-machine-config-operator-container" \
        name="openshift/ose-machine-config-operator" \
        io.openshift.build.source-location="https://github.com/openshift/machine-config-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/machine-config-operator/commit/b2ee2cf36a40ae41dc98d1e880faa8279e0feba2" \
        version="v4.1.3" \
        io.openshift.build.commit.id="b2ee2cf36a40ae41dc98d1e880faa8279e0feba2" \
        release="201906181537"

