FROM openshift/golang-builder:1.12 AS builder
ENV __doozer=update BUILD_RELEASE=202005201238 BUILD_VERSION=v4.3.22 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=22 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.22-202005201238 
ENV __doozer=merge OS_GIT_COMMIT=a5adc1e OS_GIT_VERSION=4.3.22-202005201238-a5adc1e SOURCE_DATE_EPOCH=1571130205 SOURCE_GIT_COMMIT=a5adc1e9012b1dd166681c378c577c070aa376a4 SOURCE_GIT_TAG=a5adc1e9 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.3.22.20200520.123801
ENV __doozer=update BUILD_RELEASE=202005201238 BUILD_VERSION=v4.3.22 OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=22 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.3.22-202005201238 
ENV __doozer=merge OS_GIT_COMMIT=a5adc1e OS_GIT_VERSION=4.3.22-202005201238-a5adc1e SOURCE_DATE_EPOCH=1571130205 SOURCE_GIT_COMMIT=a5adc1e9012b1dd166681c378c577c070aa376a4 SOURCE_GIT_TAG=a5adc1e9 SOURCE_GIT_URL=https://github.com/openshift/csi-external-snapshotter 
COPY --from=builder /go/src/github.com/kubernetes-csi/external-snapshotter/bin/csi-snapshotter /usr/bin/
ENTRYPOINT ["/usr/bin/csi-snapshotter"]

LABEL \
        name="openshift/ose-csi-external-snapshotter" \
        com.redhat.component="ose-csi-external-snapshotter-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Storage" \
        version="v4.3.22" \
        release="202005201238" \
        io.openshift.build.commit.id="a5adc1e9012b1dd166681c378c577c070aa376a4" \
        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/a5adc1e9012b1dd166681c378c577c070aa376a4"

