FROM openshift/golang-builder@sha256:ab1bfcb9d06b339cb767acb804e6aa82eb23cd0795e6f82af54e92c312a32777
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gd3f7092.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202201211922.p0.gd3f7092.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=d3f7092 OS_GIT_VERSION=4.7.0-202201211922.p0.gd3f7092.assembly.stream-d3f7092 SOURCE_DATE_EPOCH=1623919845 SOURCE_GIT_COMMIT=d3f709218512df9f46e11c1d13347fc68774d72c SOURCE_GIT_TAG=v0.2.0-782-gd3f70921 SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-openstack 
COPY . /go/src/k8s.io/cloud-provider-openstack
RUN cd /go/src/k8s.io/cloud-provider-openstack && \
    go build -o cinder-csi-plugin cmd/cinder-csi-plugin/main.go

FROM openshift/ose-base:v4.7.0-202201082234.p0.g0e45f63.assembly.stream
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gd3f7092.assembly.stream BUILD_VERSION=v4.7.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=7 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.7.0-202201211922.p0.gd3f7092.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=d3f7092 OS_GIT_VERSION=4.7.0-202201211922.p0.gd3f7092.assembly.stream-d3f7092 SOURCE_DATE_EPOCH=1623919845 SOURCE_GIT_COMMIT=d3f709218512df9f46e11c1d13347fc68774d72c SOURCE_GIT_TAG=v0.2.0-782-gd3f70921 SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-openstack 

# Get mkfs & blkid
RUN yum update -y && \
    yum install --setopt=tsflags=nodocs -y e2fsprogs xfsprogs util-linux systemd-udev && \
    yum clean all && rm -rf /var/cache/yum/*

COPY --from=0 /go/src/k8s.io/cloud-provider-openstack/cinder-csi-plugin /usr/bin/

ENTRYPOINT ["/usr/bin/cinder-csi-plugin"]

LABEL \
        name="openshift/ose-openstack-cinder-csi-driver" \
        com.redhat.component="ose-openstack-cinder-csi-driver-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202201211922.p0.gd3f7092.assembly.stream" \
        io.openshift.build.commit.id="d3f709218512df9f46e11c1d13347fc68774d72c" \
        io.openshift.build.source-location="https://github.com/openshift/cloud-provider-openstack" \
        io.openshift.build.commit.url="https://github.com/openshift/cloud-provider-openstack/commit/d3f709218512df9f46e11c1d13347fc68774d72c" \
        version="v4.7.0"

