diff --git a/README.md b/README.md index 3475fed2..63d3cbcb 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,8 @@ prometheus-nats-exporter url Set the password for HTTP scrapes. NATS bcrypt supported. -http_user string Enable basic auth and set user name for HTTP scrapes. + -jsz string + Select JetStream metrics to filter (e.g streams, accounts, consumers, all) -l string Log file name. -log string diff --git a/docker/linux/amd64/Dockerfile b/docker/linux/amd64/Dockerfile index 441f4a19..ab62dbce 100644 --- a/docker/linux/amd64/Dockerfile +++ b/docker/linux/amd64/Dockerfile @@ -1,11 +1,8 @@ # Golang binary building stage -FROM golang:1.15 - -# download the source -WORKDIR /go/src/github.com/nats-io/prometheus-nats-exporter -RUN git clone --branch v0.7.0 https://github.com/nats-io/prometheus-nats-exporter.git . - -# build +FROM golang:1.16 +WORKDIR $GOPATH/src/github.com/nats-io/prometheus-nats-exporter +COPY . . +RUN go get ./... RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -a -tags netgo -installsuffix netgo -ldflags "-s -w" # Final docker image building stage