FROM openshift/golang-builder:rhel_8_golang_1.15
ENV __doozer=update BUILD_RELEASE=202104030128.p0 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-202104030128.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=5202bfdc042bafa732f19dcbec31ca6137fa3fa4 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=19+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.19.0+5202bfd OS_GIT_COMMIT=5202bfd OS_GIT_VERSION=4.7.0-202104030128.p0-5202bfd SOURCE_DATE_EPOCH=1615424377 SOURCE_GIT_COMMIT=5202bfdc042bafa732f19dcbec31ca6137fa3fa4 SOURCE_GIT_TAG=v0.2.0-779-g5202bfdc 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 manila-csi-plugin cmd/manila-csi-plugin/main.go

FROM openshift/ose-base:v4.7.0.20210403.020833
ENV __doozer=update BUILD_RELEASE=202104030128.p0 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-202104030128.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=5202bfdc042bafa732f19dcbec31ca6137fa3fa4 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=19+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.19.0+5202bfd OS_GIT_COMMIT=5202bfd OS_GIT_VERSION=4.7.0-202104030128.p0-5202bfd SOURCE_DATE_EPOCH=1615424377 SOURCE_GIT_COMMIT=5202bfdc042bafa732f19dcbec31ca6137fa3fa4 SOURCE_GIT_TAG=v0.2.0-779-g5202bfdc SOURCE_GIT_URL=https://github.com/openshift/cloud-provider-openstack 

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

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

LABEL \
        name="openshift/ose-csi-driver-manila" \
        com.redhat.component="csi-driver-manila-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202104030128.p0" \
        io.openshift.build.commit.id="5202bfdc042bafa732f19dcbec31ca6137fa3fa4" \
        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/5202bfdc042bafa732f19dcbec31ca6137fa3fa4" \
        version="v4.7.0"

