-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.6 KB
/
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
39
40
#------------------------------------------------------------------------------
# Set the base image for subsequent instructions:
#------------------------------------------------------------------------------
FROM alpine:3.6
MAINTAINER Marc Villacorta Morera <[email protected]>
#------------------------------------------------------------------------------
# Environment variables:
#------------------------------------------------------------------------------
ENV GOPATH="/go" \
VERSION="0.8.0"
#------------------------------------------------------------------------------
# Install docker:
#------------------------------------------------------------------------------
RUN apk add -U --no-cache -t dev git go make musl-dev \
&& mkdir -p ${GOPATH}/src/github.com/prometheus \
&& cd ${GOPATH}/src/github.com/prometheus \
&& git clone https://github.com/prometheus/alertmanager.git \
&& cd alertmanager && git checkout v${VERSION} -b build \
&& make build && mv alertmanager /usr/local/bin \
&& apk del --purge dev && rm -rf /tmp/* /go
#------------------------------------------------------------------------------
# Volumes:
#------------------------------------------------------------------------------
VOLUME [ "/etc/alertmanager", \
"/var/lib/alertmanager" ]
#------------------------------------------------------------------------------
# Command:
#------------------------------------------------------------------------------
ENTRYPOINT [ "alertmanager" ]
CMD [ "-config.file=/etc/alertmanager/config.yml", \
"-storage.path=/var/lib/alertmanager" ]