FROM openshift/golang-builder@sha256:ab1bfcb9d06b339cb767acb804e6aa82eb23cd0795e6f82af54e92c312a32777 AS builder
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gf6c2ccd.assembly.stream 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-202201211922.p0.gf6c2ccd.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f6c2ccd OS_GIT_VERSION=4.7.0-202201211922.p0.gf6c2ccd.assembly.stream-f6c2ccd SOURCE_DATE_EPOCH=1639148307 SOURCE_GIT_COMMIT=f6c2ccdb864a819e51c91ae0a94c64c95d06bef9 SOURCE_GIT_TAG=f6c2ccdb SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator 
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-sriov-network-config-daemon BIN_PATH=build/_output/cmd
RUN make plugins BIN_PATH=build/_output/pkg

FROM openshift/ose-base:v4.7.0-202201082234.p0.g0e45f63.assembly.stream
ENV __doozer=update BUILD_RELEASE=202201211922.p0.gf6c2ccd.assembly.stream 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-202201211922.p0.gf6c2ccd.assembly.stream SOURCE_GIT_TREE_STATE=clean 
ENV __doozer=merge OS_GIT_COMMIT=f6c2ccd OS_GIT_VERSION=4.7.0-202201211922.p0.gf6c2ccd.assembly.stream-f6c2ccd SOURCE_DATE_EPOCH=1639148307 SOURCE_GIT_COMMIT=f6c2ccdb864a819e51c91ae0a94c64c95d06bef9 SOURCE_GIT_TAG=f6c2ccdb SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator 
RUN yum -y update && ARCH_DEP_PKGS=$(if [ "$(uname -m)" != "s390x" ]; then echo -n mstflint ; fi) && yum -y install hwdata $ARCH_DEP_PKGS && yum clean all
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/cmd/sriov-network-config-daemon /usr/bin/
COPY --from=builder /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator/build/_output/pkg/plugins /plugins
COPY bindata /bindata
ENV PLUGINSPATH=/plugins
ENV CLUSTER_TYPE=openshift
CMD ["/usr/bin/sriov-network-config-daemon"]

LABEL \
        io.k8s.display-name="OpenShift sriov-network-config-daemon" \
        io.k8s.description="This is a daemon that manage and config sriov network devices in Openshift cluster" \
        io.openshift.tags="openshift,networking,sr-iov" \
        maintainer="Multus team <multus-dev@redhat.com>" \
        name="openshift/ose-sriov-network-config-daemon" \
        com.redhat.component="sriov-network-config-daemon-container" \
        io.openshift.maintainer.product="OpenShift Container Platform" \
        io.openshift.maintainer.component="Networking" \
        io.openshift.maintainer.subcomponent="SR-IOV" \
        release="202201211922.p0.gf6c2ccd.assembly.stream" \
        io.openshift.build.commit.id="f6c2ccdb864a819e51c91ae0a94c64c95d06bef9" \
        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/f6c2ccdb864a819e51c91ae0a94c64c95d06bef9" \
        version="v4.7.0"

