From 28751ecb1e654eedc4db7ba375d62d3b30ceb04d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Mon, 10 Feb 2025 10:21:21 -0500 Subject: [PATCH] Statically link CNI plugins Signed-off-by: Davanum Srinivas --- images/base/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/base/Dockerfile b/images/base/Dockerfile index 5efe1d73..1ce80d74 100644 --- a/images/base/Dockerfile +++ b/images/base/Dockerfile @@ -176,7 +176,7 @@ RUN git clone --filter=tree:0 "${CNI_PLUGINS_CLONE_URL}" /cni-plugins \ && eval "$(gimme "${GO_VERSION}")" \ && export GOTOOLCHAIN="go${GO_VERSION}" \ && mkdir ./bin \ - && export GOARCH=$TARGETARCH && export CC=$(target-cc) && export CGO_ENABLED=1 \ + && export GOARCH=$TARGETARCH && export CC=$(target-cc) && export CGO_ENABLED=0 \ && go build -o ./bin/host-local -mod=vendor ./plugins/ipam/host-local \ && go build -o ./bin/loopback -mod=vendor ./plugins/main/loopback \ && go build -o ./bin/ptp -mod=vendor ./plugins/main/ptp \