FROM openshift/golang-builder:1.10 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=1 OS_GIT_PATCH=37 OS_GIT_VERSION=4.1.37-202003021622-bc12489 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=bc12489f6e644646b3183e130b1947bd559ce33d SOURCE_GIT_TAG=bc12489 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_DATE_EPOCH=1562087662 OS_GIT_COMMIT=bc12489 BUILD_VERSION=v4.1.37 BUILD_RELEASE=202003021622
WORKDIR /go/src/github.com/openshift/cluster-storage-operator
COPY . .
RUN make build

FROM openshift/ose-base:v4.1.37.20200302.165904
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=1 OS_GIT_PATCH=37 OS_GIT_VERSION=4.1.37-202003021622-bc12489 OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=bc12489f6e644646b3183e130b1947bd559ce33d SOURCE_GIT_TAG=bc12489 SOURCE_GIT_URL=https://github.com/openshift/cluster-storage-operator SOURCE_DATE_EPOCH=1562087662 OS_GIT_COMMIT=bc12489 BUILD_VERSION=v4.1.37 BUILD_RELEASE=202003021622
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.1.37" \
        release="202003021622" \
        io.openshift.build.commit.id="bc12489f6e644646b3183e130b1947bd559ce33d" \
        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/bc12489f6e644646b3183e130b1947bd559ce33d"

