FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202108160002.p0.git.2677373.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-202108160002.p0.git.2677373.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=26773735c1cbf09de9bf31cb3c640abdca04cd83 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=20+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.20.0+2677373 OS_GIT_COMMIT=2677373 OS_GIT_VERSION=4.7.0-202108160002.p0.git.2677373.assembly.stream-2677373 SOURCE_DATE_EPOCH=1610739105 SOURCE_GIT_COMMIT=26773735c1cbf09de9bf31cb3c640abdca04cd83 SOURCE_GIT_TAG=v1.0.0-rc2-706-g26773735 SOURCE_GIT_URL=https://github.com/openshift/csi-external-snapshotter 
WORKDIR /go/src/github.com/kubernetes-csi/external-snapshotter
COPY . .
RUN make build

FROM openshift/ose-base:v4.7.0.20210816.001929
ENV __doozer=update BUILD_RELEASE=202108160002.p0.git.2677373.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-202108160002.p0.git.2677373.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=26773735c1cbf09de9bf31cb3c640abdca04cd83 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=20+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.20.0+2677373 OS_GIT_COMMIT=2677373 OS_GIT_VERSION=4.7.0-202108160002.p0.git.2677373.assembly.stream-2677373 SOURCE_DATE_EPOCH=1610739105 SOURCE_GIT_COMMIT=26773735c1cbf09de9bf31cb3c640abdca04cd83 SOURCE_GIT_TAG=v1.0.0-rc2-706-g26773735 SOURCE_GIT_URL=https://github.com/openshift/csi-external-snapshotter 
COPY --from=builder /go/src/github.com/kubernetes-csi/external-snapshotter/bin/snapshot-validation-webhook /usr/bin/
ENTRYPOINT ["/usr/bin/snapshot-validation-webhook"]

LABEL \
        name="openshift/ose-csi-snapshot-validation-webhook" \
        com.redhat.component="ose-csi-snapshot-validation-webhook-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Storage" \
        release="202108160002.p0.git.2677373.assembly.stream" \
        io.openshift.build.commit.id="26773735c1cbf09de9bf31cb3c640abdca04cd83" \
        io.openshift.build.source-location="https://github.com/openshift/csi-external-snapshotter" \
        io.openshift.build.commit.url="https://github.com/openshift/csi-external-snapshotter/commit/26773735c1cbf09de9bf31cb3c640abdca04cd83" \
        version="v4.7.0"

