FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202103010125.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-202103010125.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2fec492 OS_GIT_VERSION=4.7.0-202103010125.p0-2fec492 SOURCE_DATE_EPOCH=1614278714 SOURCE_GIT_COMMIT=2fec4928d80bffd141754ecaf13a5c91de3b33ca SOURCE_GIT_TAG=2fec4928 SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator 
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-webhook BIN_PATH=build/_output/cmd

FROM openshift/ose-base:v4.7.0.20210301.020426
ENV __doozer=update BUILD_RELEASE=202103010125.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-202103010125.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2fec492 OS_GIT_VERSION=4.7.0-202103010125.p0-2fec492 SOURCE_DATE_EPOCH=1614278714 SOURCE_GIT_COMMIT=2fec4928d80bffd141754ecaf13a5c91de3b33ca SOURCE_GIT_TAG=2fec4928 SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator 
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/webhook /usr/bin/webhook
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/webhook"]

LABEL \
        io.k8s.display-name="OpenShift sriov-network-webhook" \
        io.k8s.description="This is an admission controller webhook that mutates and validates customer resources of sriov network operator." \
        io.openshift.tags="openshift,networking,sr-iov" \
        maintainer="Multus team <multus-dev@redhat.com>" \
        name="openshift/ose-sriov-network-webhook" \
        com.redhat.component="sriov-network-webhook-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="SR-IOV" \
        release="202103010125.p0" \
        io.openshift.build.commit.id="2fec4928d80bffd141754ecaf13a5c91de3b33ca" \
        io.openshift.build.source-location="https://github.com/openshift/sriov-network-operator" \
        io.openshift.build.commit.url="https://github.com/openshift/sriov-network-operator/commit/2fec4928d80bffd141754ecaf13a5c91de3b33ca" \
        version="v4.7.0"

