forked from solacecommunity/solace-prometheus-exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (28 loc) · 749 Bytes
/
Dockerfile
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
29
30
31
32
33
34
35
36
37
38
FROM golang:1.13 AS builder
LABEL builder=true
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
WORKDIR /go/src/app
COPY . .
RUN go get -d -v ./... \
&& go install -v ./... \
&& go test -short ./... \
&& go build \
-a \
-ldflags '-s -w -extldflags "-static"' \
-o /bin/solace_exporter
FROM scratch
LABEL maintainer="Daniel Brunold <[email protected]>"
ENV SOLACE_LISTEN_ADDR="0.0.0.0:9628"
ENV SOLACE_SCRAPE_URI=http://localhost:8080
ENV SOLACE_USERNAME="admin"
ENV SOLACE_PASSWORD="admin"
ENV SOLACE_TIMEOUT="5s"
ENV SOLACE_SSL_VERIFY="false"
ENV SOLACE_REDUNDANCY="false"
EXPOSE 9628
ENTRYPOINT [ "/solace_exporter" ]
CMD [ ]
COPY --from=builder /etc/passwd /etc/passwd
COPY --from=builder /bin/solace_exporter /solace_exporter