From 726b672aaac8c65005222f4917d555ff24da3f9d Mon Sep 17 00:00:00 2001 From: PhracturedBlue Date: Thu, 19 Aug 2021 19:07:40 -0700 Subject: [PATCH] Add tuning and firewall CNI plugins Signed-off-by: PhracturedBlue --- Dockerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index c5f161a..5f98b83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -53,12 +53,13 @@ RUN set -ex; \ # CNI plugins FROM podmanbuildbase AS cniplugins ARG CNI_PLUGIN_VERSION=v1.0.0-rc1 +ARG CNI_PLUGINS="ipam/host-local main/loopback main/bridge meta/portmap meta/tuning meta/firewall" RUN git clone -c 'advice.detachedHead=false' --branch=${CNI_PLUGIN_VERSION} https://github.com/containernetworking/plugins /go/src/github.com/containernetworking/plugins WORKDIR /go/src/github.com/containernetworking/plugins RUN set -ex; \ - for PLUGINDIR in plugins/ipam/host-local plugins/main/loopback plugins/main/bridge plugins/meta/portmap; do \ + for PLUGINDIR in $CNI_PLUGINS; do \ PLUGINBIN=/usr/local/lib/cni/$(basename $PLUGINDIR); \ - CGO_ENABLED=0 go build -o $PLUGINBIN -ldflags "-s -w -extldflags '-static'" ./$PLUGINDIR; \ + CGO_ENABLED=0 go build -o $PLUGINBIN -ldflags "-s -w -extldflags '-static'" ./plugins/$PLUGINDIR; \ [ "$(ldd $PLUGINBIN | grep -Ev '^\s+ldd \(0x[0-9a-f]+\)$' | wc -l)" -eq 0 ] || (ldd $PLUGINBIN; false); \ done