FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=c1a4b2bea05ad843ad0e1217d4864dc148e82875 SOURCE_DATE_EPOCH=1570206091 BUILD_VERSION=v4.1.22 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_GIT_TAG=c1a4b2be BUILD_RELEASE=201910291109
WORKDIR /go/src/github.com/openshift/cluster-image-registry-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.1.22.20191029.110950
ENV SOURCE_GIT_COMMIT=c1a4b2bea05ad843ad0e1217d4864dc148e82875 SOURCE_DATE_EPOCH=1570206091 BUILD_VERSION=v4.1.22 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_GIT_TAG=c1a4b2be BUILD_RELEASE=201910291109
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/c1a4b2bea05ad843ad0e1217d4864dc148e82875" \
        version="v4.1.22" \
        io.openshift.build.commit.id="c1a4b2bea05ad843ad0e1217d4864dc148e82875" \
        release="201910291109"

