FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202105210300.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-202105210300.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f152de8 OS_GIT_VERSION=4.7.0-202105210300.p0-f152de8 SOURCE_DATE_EPOCH=1610732733 SOURCE_GIT_COMMIT=f152de8ab08d9a4f13c97941afa01ef343b92b68 SOURCE_GIT_TAG=v0.4.0-538-gf152de8a SOURCE_GIT_URL=https://github.com/openshift/csi-external-attacher 
WORKDIR /go/src/github.com/kubernetes-csi/external-attacher
COPY . .
RUN make build

FROM openshift/ose-base:v4.7.0.20210521.031450
ENV __doozer=update BUILD_RELEASE=202105210300.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-202105210300.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f152de8 OS_GIT_VERSION=4.7.0-202105210300.p0-f152de8 SOURCE_DATE_EPOCH=1610732733 SOURCE_GIT_COMMIT=f152de8ab08d9a4f13c97941afa01ef343b92b68 SOURCE_GIT_TAG=v0.4.0-538-gf152de8a SOURCE_GIT_URL=https://github.com/openshift/csi-external-attacher 
COPY --from=builder /go/src/github.com/kubernetes-csi/external-attacher/bin/csi-attacher /usr/bin/
ENTRYPOINT ["/usr/bin/csi-attacher"]

LABEL \
        License="ASL 2.0" \
        io.k8s.description="External attacher for CSI volumes" \
        io.k8s.display-name="External attacher for CSI volumes" \
        io.openshift.tags="csi,storage,attacher" \
        vendor="Red Hat" \
        name="openshift/ose-csi-external-attacher" \
        com.redhat.component="csi-attacher-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Storage" \
        release="202105210300.p0" \
        io.openshift.build.commit.id="f152de8ab08d9a4f13c97941afa01ef343b92b68" \
        io.openshift.build.source-location="https://github.com/openshift/csi-external-attacher" \
        io.openshift.build.commit.url="https://github.com/openshift/csi-external-attacher/commit/f152de8ab08d9a4f13c97941afa01ef343b92b68" \
        version="v4.7.0"

