FROM openshift/golang-builder:rhel_8_golang_1.16 AS builder
ENV __doozer=update BUILD_RELEASE=202112141153.p0.g1e2cca9.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202112141153.p0.g1e2cca9.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=1e2cca9 OS_GIT_VERSION=4.8.0-202112141153.p0.g1e2cca9.assembly.stream-1e2cca9 SOURCE_DATE_EPOCH=1620733682 SOURCE_GIT_COMMIT=1e2cca95999057e16fcfee07e8068f7a77f2e164 SOURCE_GIT_TAG=v1.0.0-rc2-764-g1e2cca95 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.8.0.20211214.120549
ENV __doozer=update BUILD_RELEASE=202112141153.p0.g1e2cca9.assembly.stream BUILD_VERSION=v4.8.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=8 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.8.0-202112141153.p0.g1e2cca9.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=1e2cca9 OS_GIT_VERSION=4.8.0-202112141153.p0.g1e2cca9.assembly.stream-1e2cca9 SOURCE_DATE_EPOCH=1620733682 SOURCE_GIT_COMMIT=1e2cca95999057e16fcfee07e8068f7a77f2e164 SOURCE_GIT_TAG=v1.0.0-rc2-764-g1e2cca95 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="202112141153.p0.g1e2cca9.assembly.stream" \
        io.openshift.build.commit.id="1e2cca95999057e16fcfee07e8068f7a77f2e164" \
        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/1e2cca95999057e16fcfee07e8068f7a77f2e164" \
        version="v4.8.0"

