@@ -12,46 +12,16 @@ ARG ARCH
1212ARG TAG
1313ENV GOARCH ${ARCH}
1414ENV GOOS "linux"
15- COPY 0001-Add-all-important-multus-binaries.patch .
1615RUN git clone --depth=1 https://github.com/k8snetworkplumbingwg/multus-cni \
1716 && cd multus-cni \
1817 && git fetch --all --tags --prune \
1918 && git checkout tags/${TAG} -b ${TAG} \
20- && patch -p1 < ../0001-Add-all-important-multus-binaries.patch \
2119 && ./hack/build-go.sh
2220
23- # ## Build the CNI plugins ###
24- FROM ${GO_IMAGE} as cni_plugins
25- ARG TAG
26- ARG CNI_PLUGINS_VERSION="v0.9.1"
27- RUN git clone --depth=1 https://github.com/containernetworking/plugins.git $GOPATH/src/github.com/containernetworking/plugins \
28- && cd $GOPATH/src/github.com/containernetworking/plugins \
29- && git fetch --all --tags --prune \
30- && git checkout tags/${CNI_PLUGINS_VERSION} -b ${CNI_PLUGINS_VERSION} \
31- && sh -ex ./build_linux.sh -v \
32- -gcflags=-trimpath=/go/src \
33- -ldflags " \
34- -X github.com/containernetworking/plugins/pkg/utils/buildversion.BuildVersion=${CNI_PLUGINS_VERSION} \
35- -linkmode=external -extldflags \" -static -Wl,--fatal-warnings\" \
36- "
37- WORKDIR $GOPATH/src/github.com/containernetworking/plugins
38- RUN go-assert-static.sh bin/* \
39- && go-assert-boring.sh \
40- bin/bridge \
41- bin/dhcp \
42- bin/host-device \
43- bin/host-local \
44- bin/ipvlan \
45- bin/macvlan \
46- bin/ptp \
47- && mkdir -vp /opt/cni/bin \
48- && install -D -s bin/* /opt/cni/bin
49-
5021# Create the multus image
5122FROM ${UBI_IMAGE}
5223RUN microdnf update -y && microdnf install python
5324COPY --from=builder /go/multus-cni /usr/src/multus-cni
54- COPY --from=cni_plugins /opt/cni/bin/bridge /opt/cni/bin/dhcp /opt/cni/bin/host-device /opt/cni/bin/host-local /opt/cni/bin/ipvlan /opt/cni/bin/macvlan /opt/cni/bin/ptp /opt/cni/bin/static /opt/cni/bin/tuning /opt/cni/bin/
5525WORKDIR /
5626RUN cp /usr/src/multus-cni/images/entrypoint.sh /entrypoint.sh
5727ENTRYPOINT ["entrypoint.sh" ]
0 commit comments