Skip to content

Commit

Permalink
Merge pull request #16 from hnlq715/fix-docker-error
Browse files Browse the repository at this point in the history
Fix docker error
  • Loading branch information
sysulq authored Mar 16, 2017
2 parents 56f7950 + 38dcb3c commit c894c71
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
FROM quay.io/prometheus/busybox:latest
FROM alpine:latest
MAINTAINER Sophos <[email protected]>

COPY bin/nginx-vts-exporter.tar.gz /bin/
COPY docker-entrypoint.sh /bin/docker-entrypoint.sh
WORKDIR /bin
COPY bin/nginx-vts-exporter /bin/
COPY docker-entrypoint.sh /bin/
RUN 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"]
ENTRYPOINT ["docker-entrypoint.sh"]
Binary file added bin/nginx-vts-exporter
Binary file not shown.
Binary file removed bin/nginx-vts-exporter.tar.gz
Binary file not shown.
4 changes: 1 addition & 3 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ default_status="$NGIX_HOST/status/format/json"
NGINX_STATUS=${NGINX_STATUS:-$default_status}
METRICS_NS=${METRICS_NS:-$DEFAULT_METRICS_NS}

tar xf /bin/nginx-vts-exporter.tar.gz -C /bin/

# If there are any arguments then we want to run those instead
#if [[ "$1" == "$binary" || -z $1 ]]; then
# exec "$@"
Expand All @@ -17,5 +15,5 @@ tar xf /bin/nginx-vts-exporter.tar.gz -C /bin/
#echo "[$0] - Metrics Namespace --> [$METRICS_NS]"
#echo "[$0] - Running metrics nginx-vts-exporter"

exec /bin/nginx-vts-exporter -nginx.scrape_uri=$NGINX_STATUS -telemetry.address $METRICS_ADDR -telemetry.endpoint $METRICS_ENDPOINT -metrics.namespace $METRICS_NS
exec nginx-vts-exporter -nginx.scrape_uri=$NGINX_STATUS -telemetry.address $METRICS_ADDR -telemetry.endpoint $METRICS_ENDPOINT -metrics.namespace $METRICS_NS
#fi

0 comments on commit c894c71

Please sign in to comment.