Skip to content

Commit

Permalink
update docker related
Browse files Browse the repository at this point in the history
  • Loading branch information
sysulq committed Mar 13, 2017
1 parent dc0f976 commit cd09c83
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
9 changes: 7 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ FROM quay.io/prometheus/busybox:latest
MAINTAINER Sophos <[email protected]>

COPY nginx_vts_exporter /bin/nginx_vts_exporter
COPY ./docker-entrypoint.sh /bin/docker-entrypoint.sh

EXPOSE 9913
ENTRYPOINT [ "/bin/nginx_vts_exporter" ]
ENV NGIX_HOST "http://localhost"
ENV METRICS_ENDPOINT "/metrics"
ENV METRICS_ADDR ":9913"
ENV DEFAULT_METRICS_NS "nginx"

ENTRYPOINT ["/bin/docker-entrypoint.sh"]
7 changes: 1 addition & 6 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
#!/bin/sh
set -eo pipefail
binary="/app/nginx-vts-exporter"
binary="/bin/nginx-vts-exporter"
default_status="$NGIX_HOST/status/format/json"
NGINX_STATUS=${NGINX_STATUS:-$default_status}
METRICS_NS=${METRICS_NS:-$DEFAULT_METRICS_NS}
VERSION=${VERSION:-$DEFAULT_VERSION}

wget https://github.com/hnlq715/nginx-vts-exporter/releases/download/${VERSION}/nginx-vts-exporter-linux-amd64.tar.gz
tar xf nginx-vts-exporter-linux-amd64.tar.gz
mv nginx-vts-exporter-linux-amd64 $binary
rm nginx-vts-exporter-linux-amd64.tar.gz
# If there are any arguments then we want to run those instead
#if [[ "$1" == "$binary" || -z $1 ]]; then
# exec "$@"
Expand Down

0 comments on commit cd09c83

Please sign in to comment.