Skip to content

Commit

Permalink
Ensure php-fpm-exporter bianry is statically compiled (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksantamaria authored Nov 6, 2024
1 parent 50e2d72 commit ed72ae2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion images/php-fpm-exporter/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit ed72ae2

Please sign in to comment.