FROM openshift/golang-builder:1.12 AS builder
ENV SOURCE_GIT_COMMIT=a9548e6d0ac621a5c6e8e3544ca680280a1ca746 SOURCE_GIT_TAG=a9548e6 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_DATE_EPOCH=1569462177 BUILD_VERSION=v4.3.3 BUILD_RELEASE=202002171705
WORKDIR /go/src/github.com/openshift/cluster-storage-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.3.3.20200217.170535
ENV SOURCE_GIT_COMMIT=a9548e6d0ac621a5c6e8e3544ca680280a1ca746 SOURCE_GIT_TAG=a9548e6 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_DATE_EPOCH=1569462177 BUILD_VERSION=v4.3.3 BUILD_RELEASE=202002171705
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.openshift.release.operator="true" \
        io.k8s.display-name="OpenShift Cluster Storage Operator" \
        io.k8s.description="This is a component of OpenShift Container Platform and manages the lifecycle of cluster storage components." \
        maintainer="Matthew Wong <mawong@redhat.com>" \
        name="openshift/ose-cluster-storage-operator" \
        com.redhat.component="ose-cluster-storage-operator-container" \
        version="v4.3.3" \
        release="202002171705" \
        io.openshift.build.commit.id="a9548e6d0ac621a5c6e8e3544ca680280a1ca746" \
        io.openshift.build.source-location="https://github.com/openshift/cluster-storage-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/cluster-storage-operator/commit/a9548e6d0ac621a5c6e8e3544ca680280a1ca746"

