FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=2 OS_GIT_PATCH=23 OS_GIT_VERSION=4.2.23-202003090920-157135b OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=157135b0ab267563688f3638a00b0c6a22080712 SOURCE_GIT_TAG=157135b0 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_DATE_EPOCH=1574952141 OS_GIT_COMMIT=157135b BUILD_VERSION=v4.2.23 BUILD_RELEASE=202003090920
WORKDIR /go/src/github.com/openshift/cluster-image-registry-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.23.20200309.092017
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=2 OS_GIT_PATCH=23 OS_GIT_VERSION=4.2.23-202003090920-157135b OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=157135b0ab267563688f3638a00b0c6a22080712 SOURCE_GIT_TAG=157135b0 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_DATE_EPOCH=1574952141 OS_GIT_COMMIT=157135b BUILD_VERSION=v4.2.23 BUILD_RELEASE=202003090920
COPY images/bin/entrypoint.sh /usr/bin/
COPY manifests/image-references manifests/0* /manifests/
COPY --from=builder /go/src/github.com/openshift/cluster-image-registry-operator/tmp/_output/bin/cluster-image-registry-operator /usr/bin/
RUN ln /usr/bin/cluster-image-registry-operator /usr/bin/cluster-image-registry-operator-watch && \
    chmod -R g+w /etc/pki/ca-trust/extracted/pem/

ENTRYPOINT ["/usr/bin/entrypoint.sh"]

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

