forked from pwillie/prometheus-es-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (23 loc) · 844 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
# Build Stage
FROM golang:alpine AS build-stage
LABEL app="build-prometheus-es-adapter"
LABEL REPO="https://github.com/pwillie/prometheus-es-adapter"
RUN apk add -U -q --no-progress make git
ADD . /go/src/github.com/pwillie/prometheus-es-adapter
WORKDIR /go/src/github.com/pwillie/prometheus-es-adapter
RUN make build-alpine
# Final Stage
FROM alpine:latest
ENV USERID 789
ENV USERNAME pesa
RUN addgroup -g ${USERID} -S ${USERNAME} \
&& adduser -u ${USERID} -G ${USERNAME} -S ${USERNAME}
ARG GIT_COMMIT
ARG VERSION
LABEL REPO="https://github.com/pwillie/prometheus-es-adapter"
LABEL GIT_COMMIT=$GIT_COMMIT
LABEL VERSION=$VERSION
RUN apk add -U ca-certificates
COPY --from=build-stage /go/src/github.com/pwillie/prometheus-es-adapter/bin/prometheus-es-adapter /usr/local/bin/
USER ${USERNAME}
ENTRYPOINT [ "prometheus-es-adapter" ]