FROM openshift/golang-builder:1.10 AS builder
ENV SOURCE_GIT_COMMIT=1a325e72ea36bf4aef146dcf0a7b2a66446cf954 SOURCE_GIT_TAG=1a325e7 SOURCE_DATE_EPOCH=1561594463
WORKDIR /go/src/github.com/openshift/cluster-storage-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.1.4.20190627.121229
ENV SOURCE_GIT_COMMIT=1a325e72ea36bf4aef146dcf0a7b2a66446cf954 SOURCE_GIT_TAG=1a325e7 SOURCE_DATE_EPOCH=1561594463
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/1a325e72ea36bf4aef146dcf0a7b2a66446cf954" \
        version="v4.1.4" \
        io.openshift.build.commit.id="1a325e72ea36bf4aef146dcf0a7b2a66446cf954" \
        release="201906271212"

