-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
70 lines (52 loc) · 1.32 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Viadeo - Consul Server mimic
#
#
FROM debian:squeeze
MAINTAINER "Xavier Krantz <xakraz@gmail.com>"
## Base
## --
RUN apt-get update
RUN apt-get install -y --force-yes\
unzip \
curl \
supervisor
COPY supervisor/supervisord.conf /etc/supervisor/supervisord.conf
EXPOSE 9001
## Consul
## --
## Dir Layout
ENV CONSUL_HOME /opt/consul
RUN mkdir -p ${CONSUL_HOME}/conf \
&& mkdir -p ${CONSUL_HOME}/data \
&& mkdir -p ${CONSUL_HOME}/logs
## Binary
ENV CONSUL_VERSION 0.5.2
ENV CONSUL_SHA256 171cf4074bfca3b1e46112105738985783f19c47f4408377241b868affa9d445
RUN curl \
--insecure \
--location \
https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_linux_amd64.zip \
> /tmp/consul.zip
RUN echo "${CONSUL_SHA256} /tmp/consul.zip" > /tmp/consul.sha256 \
&& sha256sum -c /tmp/consul.sha256 \
&& cd /bin \
&& unzip /tmp/consul.zip \
&& chmod +x /bin/consul \
&& rm /tmp/consul.zip
EXPOSE 8300 8301 8301/udp 8302 8302/udp 8400 8500 8600 8600/udp
## Consul - UI
RUN curl \
--insecure \
--location \
https://dl.bintray.com/mitchellh/consul/${CONSUL_VERSION}_web_ui.zip \
> /tmp/webui.zip
RUN cd /tmp \
&& unzip webui.zip \
&& mv dist ${CONSUL_HOME}/ui \
&& rm webui.zip
## Consul - Conf
COPY consul/* ${CONSUL_HOME}/conf/
COPY supervisor/conf.d/* /etc/supervisor/conf.d/
## Service
## --
CMD ["supervisord", "-n"]