From e1373e062ee97e4b2408260bf6f032f8885e3232 Mon Sep 17 00:00:00 2001 From: Nick Santamaria Date: Wed, 6 Nov 2024 14:23:52 +1100 Subject: [PATCH] Ensure php-fpm-exporter bianry is statically compiled --- images/php-fpm-exporter/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/php-fpm-exporter/Dockerfile b/images/php-fpm-exporter/Dockerfile index 74ab56d3..ddc1c40f 100644 --- a/images/php-fpm-exporter/Dockerfile +++ b/images/php-fpm-exporter/Dockerfile @@ -3,7 +3,7 @@ RUN git clone https://github.com/hipages/php-fpm_exporter.git /workspace WORKDIR /workspace RUN make deps RUN TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64}; \ - GOOS=${TARGETPLATFORM%%/*} GOARCH=${TARGETPLATFORM#*/} go build -o php-fpm-exporter . + GOOS=${TARGETPLATFORM%%/*} GOARCH=${TARGETPLATFORM#*/} go build -o php-fpm-exporter -ldflags='-extldflags "-static"' . FROM gcr.io/distroless/static:nonroot LABEL org.opencontainers.image.authors="Single Digital Presence"