Skip to content

Commit eba3df2

Browse files
committed
prometheus-php-fpm-exporter: Bullseye update and fix build script
The original repo hasn't been updated in 9 months and contains a bug breaking the build (see bakins/php-fpm-exporter#48) Use a fixed fork (https://github.com/olivierbeytrison/php-fpm-exporter) Upgrade image to bullseye, build image to golang1.15 Change-Id: Ic22672202b9a573a3d12323f220d0554168e7bb7
1 parent 85ad11d commit eba3df2

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

images/prometheus-exporters/php-fpm/Dockerfile.template

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
FROM {{ "golang" | image_tag }} as build
2-
USER root
3-
RUN {{ "upx-ucl" | apt_install }}
4-
USER nobody
5-
RUN go get -d github.com/bakins/php-fpm-exporter && cd /go/src/github.com/bakins/php-fpm-exporter && \
6-
GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" ./cmd/php-fpm-exporter && \
7-
upx --brute php-fpm-exporter && cp php-fpm-exporter /go/bin
1+
FROM {{ "golang1.15" | image_tag }} as build
2+
ENV SOURCE_REPO=https://github.com/olivierbeytrison/php-fpm-exporter
83

4+
USER nobody
5+
RUN git clone $SOURCE_REPO && \
6+
cd php-fpm-exporter && \
7+
./script/build
98

109
FROM {{ registry }}/wikimedia-buster:latest
1110

12-
COPY --from=build /go/bin/php-fpm-exporter /usr/bin/prometheus-php-fpm-exporter
11+
COPY --from=build /go/php-fpm-exporter/php-fpm-exporter.linux.amd64 /usr/bin/prometheus-php-fpm-exporter
1312

1413
USER {{ "nobody" | uid }}
1514
ENTRYPOINT ["/usr/bin/prometheus-php-fpm-exporter"]

images/prometheus-exporters/php-fpm/changelog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
prometheus-php-fpm-exporter (0.0.3) wikimedia; urgency=high
2+
3+
* Use upstream build script
4+
* Switch to olivierbeytrison's fork that fixes build process
5+
* Update to bullseye
6+
7+
-- Clément Goubert <Clément Goubert <[email protected]>> Mon, 11 Dec 2023 14:34:04 +0100
8+
19
prometheus-php-fpm-exporter (0.0.2-20231210) wikimedia; urgency=medium
210

311
* Weekly rebuild.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
Package: prometheus-php-fpm-exporter
22
Description: php-fpm prometheus exporter
33
Maintainer: Giuseppe Lavagetto <[email protected]>
4+
Build-Depends: golang1.15

0 commit comments

Comments
 (0)