FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=afd711132340f353f4f66e44e0949888b23324ac SOURCE_GIT_TAG=4.0.0-166-gafd71113
WORKDIR /go/src/github.com/openshift/cluster-image-registry-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.1.0.20190519.172343
ENV SOURCE_GIT_COMMIT=afd711132340f353f4f66e44e0949888b23324ac SOURCE_GIT_TAG=4.0.0-166-gafd71113
COPY --from=builder /go/src/github.com/openshift/cluster-image-registry-operator/tmp/_output/bin/cluster-image-registry-operator /usr/bin/
RUN useradd cluster-image-registry-operator
USER cluster-image-registry-operator
COPY manifests/image-references manifests/0* /manifests/

LABEL \
        com.redhat.component="ose-cluster-image-registry-operator-container" \
        name="openshift/ose-cluster-image-registry-operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-image-registry-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-image-registry-operator/commit/afd711132340f353f4f66e44e0949888b23324ac" \
        version="v4.1.0" \
        io.openshift.build.commit.id="afd711132340f353f4f66e44e0949888b23324ac" \
        release="201905191700"

