From 309005e7c7c1721328fbc70e84592a13ba81aad4 Mon Sep 17 00:00:00 2001 From: Sophos Date: Thu, 16 Mar 2017 10:45:22 +0800 Subject: [PATCH] update Dockerfile --- Dockerfile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index db806f2..3e09879 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,14 @@ -FROM quay.io/prometheus/busybox:latest +FROM alpine:latest MAINTAINER Sophos +WORKDIR /bin COPY bin/nginx-vts-exporter.tar.gz /bin/ -COPY docker-entrypoint.sh /bin/docker-entrypoint.sh +RUN tar xf /bin/nginx-vts-exporter.tar.gz -C /bin/ && chmod +x /bin/nginx-vts-exporter -ENV NGIX_HOST "http://localhost" +ENV NGINX_HOST "http://localhost" ENV METRICS_ENDPOINT "/metrics" ENV METRICS_ADDR ":9913" ENV DEFAULT_METRICS_NS "nginx" -ENTRYPOINT ["/bin/docker-entrypoint.sh"] \ No newline at end of file +ENTRYPOINT ["nginx-vts-exporter"] +CMD -nginx.scrape_uri=$NGINX_STATUS/status/format/json -telemetry.address $METRICS_ADDR -telemetry.endpoint $METRICS_ENDPOINT -metrics.namespace $METRICS_NS \ No newline at end of file