-
Notifications
You must be signed in to change notification settings - Fork 21
/
Dockerfile
24 lines (17 loc) · 914 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
FROM golang:alpine AS builder
ARG VERSION=v1.1.4
ADD . $GOPATH/src/github.com/aerospike/aerospike-prometheus-exporter
WORKDIR $GOPATH/src/github.com/aerospike/aerospike-prometheus-exporter
RUN go build -ldflags="-X 'main.version=$VERSION'" -o aerospike-prometheus-exporter . \
&& cp aerospike-prometheus-exporter /aerospike-prometheus-exporter
FROM alpine:latest
COPY --from=builder /aerospike-prometheus-exporter /usr/bin/aerospike-prometheus-exporter
COPY ape.toml.template /etc/aerospike-prometheus-exporter/ape.toml.template
COPY docker-entrypoint.sh /docker-entrypoint.sh
RUN apk add gettext libintl \
&& chmod +x /docker-entrypoint.sh
# you could change the port via env var and then would have to --expose in run.
# That is likely unnecessary though
EXPOSE 9145
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD ["aerospike-prometheus-exporter", "--config", "/etc/aerospike-prometheus-exporter/ape.toml"]