forked from gliderlabs/docker-consul
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
35 lines (25 loc) · 1.27 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
FROM alpine:3.2
RUN apk --update add curl bash ca-certificates && \
curl -Ls https://circle-artifacts.com/gh/andyshinn/alpine-pkg-glibc/6/artifacts/0/home/ubuntu/alpine-pkg-glibc/packages/x86_64/glibc-2.21-r2.apk > /tmp/glibc-2.21-r2.apk && \
apk add --allow-untrusted /tmp/glibc-2.21-r2.apk && \
rm -rf /tmp/glibc-2.21-r2.apk /var/cache/apk/*
ADD https://releases.hashicorp.com/consul/0.5.0/consul_0.5.0_linux_amd64.zip /tmp/consul.zip
RUN cd /bin && unzip /tmp/consul.zip && chmod +x /bin/consul && rm /tmp/consul.zip
ADD https://releases.hashicorp.com/consul/0.5.0/consul_0.5.0_web_ui.zip /tmp/webui.zip
RUN mkdir /ui && cd /ui && unzip /tmp/webui.zip && rm /tmp/webui.zip && mv dist/* . && rm -rf dist
ADD https://get.docker.io/builds/Linux/x86_64/docker-1.5.0 /bin/docker
RUN chmod +x /bin/docker
RUN cat /etc/ssl/certs/*.crt > /etc/ssl/certs/ca-certificates.crt && \
sed -i -r '/^#.+/d' /etc/ssl/certs/ca-certificates.crt
ADD ./config /config/
ONBUILD ADD ./config /config/
ADD ./start /bin/start
ADD ./check-http /bin/check-http
ADD ./check-cmd /bin/check-cmd
EXPOSE 8300 8301 8301/udp 8302 8302/udp 8400 8500 53 53/udp
VOLUME ["/data"]
RUN mkdir -p /var/log/consul
ENV CONSUL_LOG_FILE /var/log/consul/consul.log
ENV SHELL /bin/bash
ENTRYPOINT ["/bin/start"]
CMD []