From 04454e176f00d48da4202ead835356d0fa28985c Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Mon, 29 Aug 2022 15:38:26 +0300 Subject: [PATCH] images: build statically linked binaries We use scratch as the base image now so now dynamically loaded libs are available. --- cmd/cri-resmgr-agent/Dockerfile | 2 +- cmd/cri-resmgr-webhook/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/cri-resmgr-agent/Dockerfile b/cmd/cri-resmgr-agent/Dockerfile index d008d3708..11bc3fb31 100644 --- a/cmd/cri-resmgr-agent/Dockerfile +++ b/cmd/cri-resmgr-agent/Dockerfile @@ -12,7 +12,7 @@ RUN go mod download # Build webhook, fully statically linked binary COPY . . -RUN CGO_ENABLED=0 make BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe" +RUN CGO_ENABLED=0 make build-static BUILD_DIRS="cri-resmgr-agent cri-resmgr-agent-probe" FROM scratch as final diff --git a/cmd/cri-resmgr-webhook/Dockerfile b/cmd/cri-resmgr-webhook/Dockerfile index d6f9c1095..399e2581e 100644 --- a/cmd/cri-resmgr-webhook/Dockerfile +++ b/cmd/cri-resmgr-webhook/Dockerfile @@ -12,7 +12,7 @@ RUN go mod download # Build webhook, fully statically linked binary COPY . . -RUN CGO_ENABLED=0 make BUILD_DIRS=cri-resmgr-webhook +RUN CGO_ENABLED=0 make build-static BUILD_DIRS=cri-resmgr-webhook FROM scratch as final