File: Dockerfile

package info (click to toggle)
prometheus-nginx-exporter 0.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 172 kB
  • sloc: makefile: 22; sh: 18
file content (13 lines) | stat: -rw-r--r-- 490 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
FROM golang:1.10 as builder
ARG VERSION
ARG GIT_COMMIT
WORKDIR /go/src/github.com/nginxinc/nginx-prometheus-exporter
COPY *.go ./
COPY vendor ./vendor
COPY collector ./collector
COPY client ./client
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags "-X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o exporter .

FROM alpine:latest
COPY --from=builder /go/src/github.com/nginxinc/nginx-prometheus-exporter/exporter /usr/bin/
ENTRYPOINT [ "/usr/bin/exporter" ]