blob: bae1e3fff6b7ba1c5b0351c0ef63b79d4a004a40 [file] [log] [blame]
Wei-Yu Chen0f12b9c2019-04-18 11:12:59 -07001# Build multus plugin
2FROM golang:1.10 AS multus
3RUN git clone -q --depth 1 https://github.com/intel/multus-cni.git /go/src/github.com/intel/multus-cni
4WORKDIR /go/src/github.com/intel/multus-cni
5RUN ./build
6
7# Build sriov plugin
8FROM golang:1.10 AS sriov-cni
9RUN git clone -q -b dev/k8s-deviceid-model https://github.com/Intel-Corp/sriov-cni.git /go/src/github.com/intel-corp/sriov-cni
10WORKDIR /go/src/github.com/intel-corp/sriov-cni
11RUN ./build
12
13# Build sriov device plugin
14FROM golang:1.10 AS sriov-dp
15RUN git clone -q https://github.com/intel/sriov-network-device-plugin.git /go/src/github.com/intel/sriov-network-device-plugin
16WORKDIR /go/src/github.com/intel/sriov-network-device-plugin
17RUN make
18
19# Build centralip ipam plugin
20FROM golang:1.10 AS centralip-ipam
21RUN go get -u github.com/kardianos/govendor
22RUN git clone -q https://github.com/John-Lin/ovs-cni.git /go/src/github.com/John-Lin/ovs-cni
23WORKDIR /go/src/github.com/John-Lin/ovs-cni
24RUN govendor sync && ./build.sh
25
26# Build vfioveth plugin
27FROM busybox as vfioveth
28RUN wget -O /bin/vfioveth https://raw.githubusercontent.com/clearlinux/cloud-native-setup/master/clr-k8s-examples/9-multi-network/cni/vfioveth
29RUN wget -O /bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
30RUN chmod +x /bin/vfioveth /bin/jq
31
32# Final image
33FROM centos/systemd
34LABEL author="Saikrishna Edupuganti <saikrishna.edupuganti@intel.com>"
35WORKDIR /tmp/cni/bin
36COPY --from=multus /go/src/github.com/intel/multus-cni/bin/multus .
37COPY --from=sriov-cni /go/src/github.com/intel-corp/sriov-cni/bin/sriov .
38COPY --from=centralip-ipam /go/src/github.com/John-Lin/ovs-cni/bin/centralip .
39COPY --from=vfioveth /bin/vfioveth .
40COPY --from=vfioveth /bin/jq .
41WORKDIR /usr/bin
42COPY --from=sriov-dp /go/src/github.com/intel/sriov-network-device-plugin/build/sriovdp .
43