From d5ccea6fc373217f7a0b89c6ee3769a4fa9a5b12 Mon Sep 17 00:00:00 2001 From: Simon Rieger Date: Mon, 9 Oct 2023 20:06:18 +0200 Subject: [PATCH] set version persistent --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 19ea602..e7caef2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ ARG BUILDPLATFORM=linux/amd64 ARG ALPINE_VERSION=3.14 -ARG RUST_VERSION=latest +ARG RUST_VERSION=1.69-bullseye FROM --platform=${BUILDPLATFORM} rust:${RUST_VERSION} AS base WORKDIR /usr/src/prometheus_wireguard_exporter @@ -128,7 +128,8 @@ RUN adduser prometheus-wireguard-exporter -s /bin/sh -D -u 1000 1000 && \ echo 'prometheus-wireguard-exporter ALL=(root) NOPASSWD:/usr/bin/wg show * dump' > /etc/sudoers.d/prometheus-wireguard-exporter && \ chmod 0440 /etc/sudoers.d/prometheus-wireguard-exporter RUN apk add --update -q --no-cache wireguard-tools-wg sudo -USER prometheus-wireguard-exporter +#USER prometheus-wireguard-exporter +USER root ENTRYPOINT ["/sbin/tini", "--", "/usr/local/bin/prometheus_wireguard_exporter"] -CMD [ "-a" ] +#CMD [ "-a" ] COPY --from=build --chown=prometheus-wireguard-exporter /tmp/binary ./prometheus_wireguard_exporter