FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=33079c7732b99394f78c4fecb8d7d277c87ef02c SOURCE_GIT_TAG=v1.0.0-24-g33079c7
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.1.1.20190604.001957
ENV SOURCE_GIT_COMMIT=33079c7732b99394f78c4fecb8d7d277c87ef02c SOURCE_GIT_TAG=v1.0.0-24-g33079c7
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/33079c7732b99394f78c4fecb8d7d277c87ef02c" \
        version="v4.1.1" \
        name="openshift/ose-cluster-version-operator" \
        io.openshift.build.commit.id="33079c7732b99394f78c4fecb8d7d277c87ef02c" \
        release="201906040019" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-version-operator"

