FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=e5e468961b5fd687f65844d511690d7ed0046447 SOURCE_DATE_EPOCH=1571807173 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-version-operator SOURCE_GIT_TAG=v1.0.0-110-ge5e4689 BUILD_RELEASE=201910230740
WORKDIR /go/src/github.com/openshift/cluster-version-operator
COPY . .
RUN hack/build-go.sh; \
    mkdir -p /tmp/build; \
    cp _output/linux/$(go env GOARCH)/cluster-version-operator /tmp/build/cluster-version-operator

FROM openshift/ose-base:v4.2.1-201910221723
ENV SOURCE_GIT_COMMIT=e5e468961b5fd687f65844d511690d7ed0046447 SOURCE_DATE_EPOCH=1571807173 BUILD_VERSION=v4.2.1 SOURCE_GIT_URL=https://github.com/openshift/cluster-version-operator SOURCE_GIT_TAG=v1.0.0-110-ge5e4689 BUILD_RELEASE=201910230740
COPY --from=builder /tmp/build/cluster-version-operator /usr/bin/
COPY install /manifests
COPY bootstrap /bootstrap
ENTRYPOINT ["/usr/bin/cluster-version-operator"]

LABEL \
        com.redhat.component="cluster-version-operator-container" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-version-operator/commit/e5e468961b5fd687f65844d511690d7ed0046447" \
        version="v4.2.1" \
        name="openshift/ose-cluster-version-operator" \
        io.openshift.build.commit.id="e5e468961b5fd687f65844d511690d7ed0046447" \
        release="201910230740" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-version-operator"

