FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202106021513.p0.git.71b6b96 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202106021513.p0.git.71b6b96 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=71b6b96 OS_GIT_VERSION=4.6.0-202106021513.p0.git.71b6b96-71b6b96 SOURCE_DATE_EPOCH=1613038174 SOURCE_GIT_COMMIT=71b6b96427de49ecbba3cf35726ff1607b9f4ae8 SOURCE_GIT_TAG=71b6b96 SOURCE_GIT_URL=https://github.com/openshift/aws-ebs-csi-driver-operator 
WORKDIR /go/src/github.com/openshift/aws-ebs-csi-driver-operator
COPY . .
RUN make

FROM openshift/ose-base:v4.6.0.20210602.153339
ENV __doozer=update BUILD_RELEASE=202106021513.p0.git.71b6b96 BUILD_VERSION=v4.6.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=6 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.6.0-202106021513.p0.git.71b6b96 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=71b6b96 OS_GIT_VERSION=4.6.0-202106021513.p0.git.71b6b96-71b6b96 SOURCE_DATE_EPOCH=1613038174 SOURCE_GIT_COMMIT=71b6b96427de49ecbba3cf35726ff1607b9f4ae8 SOURCE_GIT_TAG=71b6b96 SOURCE_GIT_URL=https://github.com/openshift/aws-ebs-csi-driver-operator 
COPY --from=builder /go/src/github.com/openshift/aws-ebs-csi-driver-operator/aws-ebs-csi-driver-operator /usr/bin/
COPY manifests /manifests
ENTRYPOINT ["/usr/bin/aws-ebs-csi-driver-operator"]

LABEL \
        io.k8s.display-name="OpenShift AWS EBS CSI Driver Operator" \
        io.k8s.description="The AWS EBS CSI Driver Operator installs and maintains the AWS EBS CSI Driver on a cluster." \
        name="openshift/ose-aws-ebs-csi-driver-operator" \
        com.redhat.component="ose-aws-ebs-csi-driver-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Storage" \
        release="202106021513.p0.git.71b6b96" \
        io.openshift.build.commit.id="71b6b96427de49ecbba3cf35726ff1607b9f4ae8" \
        io.openshift.build.source-location="https://github.com/openshift/aws-ebs-csi-driver-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/aws-ebs-csi-driver-operator/commit/71b6b96427de49ecbba3cf35726ff1607b9f4ae8" \
        version="v4.6.0"

