FROM openshift/golang-builder:1.13 AS builder
ENV __doozer=update BUILD_RELEASE=202101160457.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202101160457.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=e0fce83e25baad0d4a13dbf21eae2fb2292febc6 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+e0fce83 OS_GIT_COMMIT=e0fce83 OS_GIT_VERSION=4.5.0-202101160457.p0-e0fce83 SOURCE_DATE_EPOCH=1603944969 SOURCE_GIT_COMMIT=e0fce83e25baad0d4a13dbf21eae2fb2292febc6 SOURCE_GIT_TAG=e0fce83 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.5.0.20210116.053741
ENV __doozer=update BUILD_RELEASE=202101160457.p0 BUILD_VERSION=v4.5.0 OS_GIT_MAJOR=4 OS_GIT_MINOR=5 OS_GIT_PATCH=0 OS_GIT_TREE_STATE=clean OS_GIT_VERSION=4.5.0-202101160457.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge KUBE_GIT_COMMIT=e0fce83e25baad0d4a13dbf21eae2fb2292febc6 KUBE_GIT_MAJOR=1 KUBE_GIT_MINOR=13+ KUBE_GIT_TREE_STATE=clean KUBE_GIT_VERSION=v1.13.0+e0fce83 OS_GIT_COMMIT=e0fce83 OS_GIT_VERSION=4.5.0-202101160457.p0-e0fce83 SOURCE_DATE_EPOCH=1603944969 SOURCE_GIT_COMMIT=e0fce83e25baad0d4a13dbf21eae2fb2292febc6 SOURCE_GIT_TAG=e0fce83 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="202101160457.p0" \
        io.openshift.build.commit.id="e0fce83e25baad0d4a13dbf21eae2fb2292febc6" \
        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/e0fce83e25baad0d4a13dbf21eae2fb2292febc6" \
        version="v4.5.0"

