monitoring/example/images/ping-exporter/Dockerfile

25 lines
989 B
Docker

FROM danielberteaud/alpine:24.3-1 AS builder
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
ARG PING_EXPORTER_VERSION=1.1.0
ADD https://github.com/czerwonk/ping_exporter/releases/download/${PING_EXPORTER_VERSION}/ping_exporter_${PING_EXPORTER_VERSION}_linux_amd64.tar.gz /tmp
ADD https://github.com/czerwonk/ping_exporter/releases/download/${PING_EXPORTER_VERSION}/ping_exporter_${PING_EXPORTER_VERSION}_checksums.txt /tmp
RUN set -eux &&\
apk --no-cache add \
tar \
gzip \
&&\
cd /tmp &&\
grep "ping_exporter_${PING_EXPORTER_VERSION}_linux_amd64.tar.gz" ping_exporter_${PING_EXPORTER_VERSION}_checksums.txt | sha256sum -c &&\
tar xvf ping_exporter_${PING_EXPORTER_VERSION}_linux_amd64.tar.gz &&\
mv ping_exporter /usr/local/bin/
FROM danielberteaud/alpine:24.3-1
MAINTAINER Daniel Berteaud <dbd@ehtrace.com>
COPY --from=builder /usr/local/bin/ping_exporter /usr/local/bin/ping_exporter
EXPOSE 9427
CMD ["ping_exporter", "--config.path=/config.yml"]