FROM openshift/golang-builder:rhel_8_golang_1.15 AS builder
ENV __doozer=update BUILD_RELEASE=202103270130.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-202103270130.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2fec492 OS_GIT_VERSION=4.7.0-202103270130.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-manager BIN_PATH=build/_output/cmd

FROM openshift/ose-base:v4.7.0.20210327.020238
ENV __doozer=update BUILD_RELEASE=202103270130.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-202103270130.p0 SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=2fec492 OS_GIT_VERSION=4.7.0-202103270130.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/manager /usr/bin/sriov-network-operator
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/manifests /manifests
COPY bindata /bindata
ENV OPERATOR_NAME=sriov-network-operator
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/sriov-network-operator"]

LABEL \
        io.k8s.display-name="OpenShift sriov-network-operator" \
        io.k8s.description="This is the component that manange and config sriov component in Openshift cluster" \
        io.openshift.tags="openshift,networking,sr-iov" \
        com.redhat.delivery.appregistry="False" \
        maintainer="Multus team <multus-dev@redhat.com>" \
        name="openshift/ose-sriov-network-operator" \
        com.redhat.component="sriov-network-operator-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="SR-IOV" \
        release="202103270130.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"

