-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (20 loc) · 811 Bytes
/
Dockerfile
File metadata and controls
28 lines (20 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM golang:1.9 as builder
WORKDIR /go/src/github.com/wrouesnel/postgres_exporter
COPY cmd ./cmd
COPY tools ./tools
COPY vendor ./vendor
COPY mage*go ./
RUN go run mage.go binary \
&& cp ./postgres_exporter /postgres_exporter
FROM scratch
# Postgres Exporter image for OpenShift Origin
LABEL io.k8s.description="Postgres Prometheus Exporter." \
io.k8s.display-name="Postgres Exporter" \
io.openshift.expose-services="9113:http" \
io.openshift.tags="postgres,exporter,prometheus" \
io.openshift.non-scalable="true" \
help="For more information visit https://github.com/Worteks/docker-pgexporter" \
maintainer="Samuel MARTIN MORO <[email protected]>" \
version="1.0"
COPY --from=builder /postgres_exporter /postgres_exporter
ENTRYPOINT ["/postgres_exporter"]