FROM openshift/golang-builder:1.11 AS builder
ENV SOURCE_GIT_COMMIT=8682a2af65d0a2199432b97db531ddfe68e5d9b2 SOURCE_DATE_EPOCH=1574952029 BUILD_VERSION=v4.2.10 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_GIT_TAG=8682a2a BUILD_RELEASE=201912022352
WORKDIR /go/src/github.com/openshift/cluster-storage-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.2.10.20191202.235209
ENV SOURCE_GIT_COMMIT=8682a2af65d0a2199432b97db531ddfe68e5d9b2 SOURCE_DATE_EPOCH=1574952029 BUILD_VERSION=v4.2.10 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_GIT_TAG=8682a2a BUILD_RELEASE=201912022352
COPY --from=builder /go/src/github.com/openshift/cluster-storage-operator/manager /usr/bin/cluster-storage-operator
COPY manifests /manifests
RUN useradd cluster-storage-operator
USER cluster-storage-operator
ENTRYPOINT ["/usr/bin/cluster-storage-operator"]

LABEL \
        io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of cluster storage components." \
        com.redhat.component="ose-cluster-storage-operator-container" \
        maintainer="Matthew Wong <mawong@redhat.com>" \
        name="openshift/ose-cluster-storage-operator" \
        io.k8s.display-name="OpenShift Cluster Storage Operator" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-storage-operator" \
        io.openshift.release.operator="true" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-storage-operator/commit/8682a2af65d0a2199432b97db531ddfe68e5d9b2" \
        version="v4.2.10" \
        io.openshift.build.commit.id="8682a2af65d0a2199432b97db531ddfe68e5d9b2" \
        release="201912022352"

