FROM openshift/golang-builder:1.12 AS builder
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-fdc52de OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=fdc52deb46149528f34cda1c85df69b51d65b8ab SOURCE_GIT_TAG=fdc52deb SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator SOURCE_DATE_EPOCH=1582903304 OS_GIT_COMMIT=fdc52de BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016
WORKDIR /go/src/github.com/openshift/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.3.13.20200413.101616
ENV OS_GIT_MAJOR=4 OS_GIT_MINOR=3 OS_GIT_PATCH=13 OS_GIT_VERSION=4.3.13-202004131016-fdc52de OS_GIT_TREE_STATE=clean SOURCE_GIT_COMMIT=fdc52deb46149528f34cda1c85df69b51d65b8ab SOURCE_GIT_TAG=fdc52deb SOURCE_GIT_URL=https://github.com/openshift/sriov-network-operator SOURCE_DATE_EPOCH=1582903304 OS_GIT_COMMIT=fdc52de BUILD_VERSION=v4.3.13 BUILD_RELEASE=202004131016
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/openshift/sriov-network-operator/build/_output/cmd/sriov-network-config-daemon /usr/bin/
COPY --from=builder /go/src/github.com/openshift/sriov-network-operator/build/_output/pkg/plugins /plugins
COPY bindata /bindata
ENV PLUGINSPATH=/plugins
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" \
        version="v4.3.13" \
        release="202004131016" \
        io.openshift.build.commit.id="fdc52deb46149528f34cda1c85df69b51d65b8ab" \
        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/fdc52deb46149528f34cda1c85df69b51d65b8ab"

