FROM openshift/golang-builder:rhel_8_golang_1.16 AS builder
ENV __doozer=update BUILD_RELEASE=202112142229.p0.g9f56afd.assembly.stream BUILD_VERSION=v4.9.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=9 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.9.0-202112142229.p0.g9f56afd.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=9f56afd OS_GIT_VERSION=4.9.0-202112142229.p0.g9f56afd.assembly.stream-9f56afd SOURCE_DATE_EPOCH=1635992015 SOURCE_GIT_COMMIT=9f56afd3450b385ef300d9783f028179161efe32 SOURCE_GIT_TAG=9f56afd SOURCE_GIT_URL=https://github.com/openshift/vmware-vsphere-csi-driver-operator 
WORKDIR /go/src/github.com/openshift/vmware-vsphere-csi-driver-operator
COPY . .
RUN make

FROM openshift/ose-base:v4.9.0-202112140956.p0.gf93eca8.assembly.stream
ENV __doozer=update BUILD_RELEASE=202112142229.p0.g9f56afd.assembly.stream BUILD_VERSION=v4.9.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=9 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.9.0-202112142229.p0.g9f56afd.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=9f56afd OS_GIT_VERSION=4.9.0-202112142229.p0.g9f56afd.assembly.stream-9f56afd SOURCE_DATE_EPOCH=1635992015 SOURCE_GIT_COMMIT=9f56afd3450b385ef300d9783f028179161efe32 SOURCE_GIT_TAG=9f56afd SOURCE_GIT_URL=https://github.com/openshift/vmware-vsphere-csi-driver-operator 
COPY --from=builder /go/src/github.com/openshift/vmware-vsphere-csi-driver-operator/vmware-vsphere-csi-driver-operator /usr/bin/
ENTRYPOINT ["/usr/bin/vmware-vsphere-csi-driver-operator"]

LABEL \
        io.k8s.display-name="OpenShift VMware vSphere CSI Driver Operator" \
        io.k8s.description="The VMware vSphere CSI Driver Operator installs and maintains the VMware vSphere CSI Driver on a cluster." \
        name="openshift/ose-vsphere-csi-driver-operator" \
        com.redhat.component="ose-vmware-vsphere-csi-driver-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Storage" \
        io.openshift.maintainer.subcomponent="Operators" \
        release="202112142229.p0.g9f56afd.assembly.stream" \
        io.openshift.build.commit.id="9f56afd3450b385ef300d9783f028179161efe32" \
        io.openshift.build.source-location="https://github.com/openshift/vmware-vsphere-csi-driver-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/vmware-vsphere-csi-driver-operator/commit/9f56afd3450b385ef300d9783f028179161efe32" \
        version="v4.9.0"

