FROM registry.ci.openshift.org/ocp/builder:rhel-8-golang-1.15-openshift-4.7 AS builder
WORKDIR /go/src/github.com/k8snetworkplumbingwg/sriov-network-operator
COPY . .
RUN make _build-manager BIN_PATH=build/_output/cmd

FROM registry.ci.openshift.org/ocp/4.7:base
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=true \
      maintainer="Multus team <multus-dev@redhat.com>"
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"]
