From 256b9fa6197f082760324e143dd12bb599037928 Mon Sep 17 00:00:00 2001 From: Christian Rohmann Date: Tue, 27 Feb 2024 15:28:19 +0100 Subject: [PATCH] Use CGO_ENABLED=0 for binary in container image to avoid GLIBC errors See https://github.com/golang/go/issues/58550 Closes #339 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 31852a5..d9a0a40 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ WORKDIR / COPY . . -RUN go mod download && go build -o /openstack-exporter . +RUN go mod download && CGO_ENABLED=0 go build -o /openstack-exporter . FROM gcr.io/distroless/base:nonroot as openstack-exporter