@@ -5,6 +5,7 @@ ARG TAG=pinned
5
5
ARG BUILD_TAG
6
6
ARG DEBIAN_VERSION=bookworm
7
7
ARG DEBIAN_FLAVOR=${DEBIAN_VERSION}-slim
8
+ ARG ALPINE_CURL_VERSION=8.11.1
8
9
9
10
# ########################################################################################
10
11
#
@@ -1266,16 +1267,31 @@ RUN set -e \
1266
1267
1267
1268
# ########################################################################################
1268
1269
#
1269
- # Layers "postgres-exporter", "pgbouncer-exporter", and "sql-exporter "
1270
+ # Layer "exporters "
1270
1271
#
1271
1272
# ########################################################################################
1272
-
1273
- FROM quay.io/prometheuscommunity/postgres-exporter:v0.16.0 AS postgres-exporter
1274
- FROM quay.io/prometheuscommunity/pgbouncer-exporter:v0.10.2 AS pgbouncer-exporter
1275
-
1276
- # Keep the version the same as in build-tools.Dockerfile and
1277
- # test_runner/regress/test_compute_metrics.py.
1278
- FROM burningalchemist/sql_exporter:0.17.0 AS sql-exporter
1273
+ FROM alpine/curl:${ALPINE_CURL_VERSION} AS exporters
1274
+ ARG TARGETARCH
1275
+ # Keep sql_exporter version same as in build-tools.Dockerfile and
1276
+ # test_runner/regress/test_compute_metrics.py
1277
+ RUN if [ "$TARGETARCH" = "amd64" ]; then\
1278
+ postgres_exporter_sha256='027e75dda7af621237ff8f5ac66b78a40b0093595f06768612b92b1374bd3105' ;\
1279
+ pgbouncer_exporter_sha256='c9f7cf8dcff44f0472057e9bf52613d93f3ffbc381ad7547a959daa63c5e84ac' ;\
1280
+ sql_exporter_sha256='38e439732bbf6e28ca4a94d7bc3686d3fa1abdb0050773d5617a9efdb9e64d08' ;\
1281
+ else\
1282
+ postgres_exporter_sha256='131a376d25778ff9701a4c81f703f179e0b58db5c2c496e66fa43f8179484786' ;\
1283
+ pgbouncer_exporter_sha256='217c4afd7e6492ae904055bc14fe603552cf9bac458c063407e991d68c519da3' ;\
1284
+ sql_exporter_sha256='11918b00be6e2c3a67564adfdb2414fdcbb15a5db76ea17d1d1a944237a893c6' ;\
1285
+ fi\
1286
+ && curl -sL https://github.com/prometheus-community/postgres_exporter/releases/download/v0.16.0/postgres_exporter-0.16.0.linux-${TARGETARCH}.tar.gz\
1287
+ | tar xzf - --strip-components=1 -C.\
1288
+ && curl -sL https://github.com/prometheus-community/pgbouncer_exporter/releases/download/v0.10.2/pgbouncer_exporter-0.10.2.linux-${TARGETARCH}.tar.gz\
1289
+ | tar xzf - --strip-components=1 -C.\
1290
+ && curl -sL https://github.com/burningalchemist/sql_exporter/releases/download/0.17.0/sql_exporter-0.17.0.linux-${TARGETARCH}.tar.gz\
1291
+ | tar xzf - --strip-components=1 -C.\
1292
+ && echo "${postgres_exporter_sha256} postgres_exporter" | sha256sum -c -\
1293
+ && echo "${pgbouncer_exporter_sha256} pgbouncer_exporter" | sha256sum -c -\
1294
+ && echo "${sql_exporter_sha256} sql_exporter" | sha256sum -c -
1279
1295
1280
1296
# ########################################################################################
1281
1297
#
@@ -1403,10 +1419,10 @@ COPY --chmod=0666 --chown=postgres compute/etc/pgbouncer.ini /etc/pgbouncer.ini
1403
1419
COPY --from=compute-tools --chown=postgres /home/nonroot/target/release-line-debug-size-lto/local_proxy /usr/local/bin/local_proxy
1404
1420
RUN mkdir -p /etc/local_proxy && chown postgres:postgres /etc/local_proxy
1405
1421
1406
- # Metrics exporter binaries and configuration files
1407
- COPY --from=postgres-exporter /bin /postgres_exporter /bin/postgres_exporter
1408
- COPY --from=pgbouncer-exporter /bin /pgbouncer_exporter /bin/pgbouncer_exporter
1409
- COPY --from=sql-exporter /bin/ sql_exporter /bin/sql_exporter
1422
+ # Metrics exporter binaries and configuration files
1423
+ COPY --from=exporters . /postgres_exporter /bin/postgres_exporter
1424
+ COPY --from=exporters . /pgbouncer_exporter /bin/pgbouncer_exporter
1425
+ COPY --from=exporters ./ sql_exporter /bin/sql_exporter
1410
1426
1411
1427
COPY --chown=postgres compute/etc/postgres_exporter.yml /etc/postgres_exporter.yml
1412
1428
0 commit comments