FROM openshift/golang-builder:rhel_8_golang_1.15
ENV __doozer=update BUILD_RELEASE=202103270130.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-202103270130.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=9404d343c020fd1806691704f64d930c779ad639 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=14+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.14.1+9404d34 OS_GIT_COMMIT=9404d34 OS_GIT_VERSION=4.7.0-202103270130.p0-9404d34 SOURCE_DATE_EPOCH=1610625384 SOURCE_GIT_COMMIT=9404d343c020fd1806691704f64d930c779ad639 SOURCE_GIT_TAG=9404d34 SOURCE_GIT_URL=https://github.com/openshift/csi-driver-nfs 
COPY . /go/src/github.com/openshift/csi-driver-nfs
RUN cd /go/src/github.com/openshift/csi-driver-nfs && \
    go build -o /go/src/github.com/openshift/csi-driver-nfs/nfsplugin cmd/nfsplugin/main.go

FROM openshift/ose-base:v4.7.0.20210327.020238
ENV __doozer=update BUILD_RELEASE=202103270130.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-202103270130.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=9404d343c020fd1806691704f64d930c779ad639 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=14+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.14.1+9404d34 OS_GIT_COMMIT=9404d34 OS_GIT_VERSION=4.7.0-202103270130.p0-9404d34 SOURCE_DATE_EPOCH=1610625384 SOURCE_GIT_COMMIT=9404d343c020fd1806691704f64d930c779ad639 SOURCE_GIT_TAG=9404d34 SOURCE_GIT_URL=https://github.com/openshift/csi-driver-nfs 

COPY --from=0 /go/src/github.com/openshift/csi-driver-nfs/nfsplugin /usr/bin/

RUN yum -y install nfs-utils && yum -y install jq && yum clean all

ENTRYPOINT ["/usr/bin/nfsplugin"]

LABEL \
        name="openshift/ose-csi-driver-nfs" \
        com.redhat.component="csi-driver-nfs-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Installer" \
        io.openshift.maintainer.subcomponent="OpenShift on OpenStack" \
        release="202103270130.p0" \
        io.openshift.build.commit.id="9404d343c020fd1806691704f64d930c779ad639" \
        io.openshift.build.source-location="https://github.com/openshift/csi-driver-nfs" \
        io.openshift.build.commit.url="https://github.com/openshift/csi-driver-nfs/commit/9404d343c020fd1806691704f64d930c779ad639" \
        version="v4.7.0"

