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 KUBE_GIT_COMMIT=552c31407f84b90ea29c6078eb73433479fc0556 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+552c314 OS_GIT_COMMIT=552c314 OS_GIT_VERSION=4.7.0-202105210300.p0-552c314 SOURCE_DATE_EPOCH=1619732630 SOURCE_GIT_COMMIT=552c31407f84b90ea29c6078eb73433479fc0556 SOURCE_GIT_TAG=552c314 SOURCE_GIT_URL=https://github.com/openshift/sriov-dp-admission-controller 
ADD . /usr/src/network-resources-injector
RUN cd /usr/src/network-resources-injector && make

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 KUBE_GIT_COMMIT=552c31407f84b90ea29c6078eb73433479fc0556 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+552c314 OS_GIT_COMMIT=552c314 OS_GIT_VERSION=4.7.0-202105210300.p0-552c314 SOURCE_DATE_EPOCH=1619732630 SOURCE_GIT_COMMIT=552c31407f84b90ea29c6078eb73433479fc0556 SOURCE_GIT_TAG=552c314 SOURCE_GIT_URL=https://github.com/openshift/sriov-dp-admission-controller 
COPY --from=builder /usr/src/network-resources-injector/bin/webhook /usr/bin/
COPY --from=builder /usr/src/network-resources-injector/bin/installer /usr/bin/


CMD ["webhook"]

LABEL \
        io.k8s.display-name="SRIOV Admission Controller" \
        name="openshift/ose-sriov-dp-admission-controller" \
        com.redhat.component="sriov-dp-admission-controller-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="SR-IOV" \
        release="202105210300.p0" \
        io.openshift.build.commit.id="552c31407f84b90ea29c6078eb73433479fc0556" \
        io.openshift.build.source-location="https://github.com/openshift/sriov-dp-admission-controller" \
        io.openshift.build.commit.url="https://github.com/openshift/sriov-dp-admission-controller/commit/552c31407f84b90ea29c6078eb73433479fc0556" \
        version="v4.7.0"

