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