FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=4599a8e42e1d329a7262470f81fda4808e073b2a SOURCE_DATE_EPOCH=1568742821 BUILD_VERSION=v4.2.0 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_GIT_TAG=4599a8e4 BUILD_RELEASE=201910101614
WORKDIR /go/src/github.com/openshift/cluster-image-registry-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.0.20191010.161456
ENV SOURCE_GIT_COMMIT=4599a8e42e1d329a7262470f81fda4808e073b2a SOURCE_DATE_EPOCH=1568742821 BUILD_VERSION=v4.2.0 SOURCE_GIT_URL=https://github.com/openshift/cluster-image-registry-operator SOURCE_GIT_TAG=4599a8e4 BUILD_RELEASE=201910101614
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 \
        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/4599a8e42e1d329a7262470f81fda4808e073b2a" \
        version="v4.2.0" \
        io.openshift.build.commit.id="4599a8e42e1d329a7262470f81fda4808e073b2a" \
        release="201910101614"

