-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
29 lines (23 loc) · 1.18 KB
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
FROM shcoder/alpine:glibc.supervisor
MAINTAINER shcoder.alex@gmail.com
ENV CONSUL_VERSION=0.7.0 \
CONSUL_TEMPLATE_VERSION=0.16.0
RUN apk --no-cache add curl unzip jq nmap && \
curl -fso /tmp/consul.zip https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip && \
unzip /tmp/consul.zip -d /sbin/ && \
chmod +x /sbin/consul && \
rm -f /tmp/consul.zip && \
mkdir -p /opt/consul-web-ui && \
curl -Lso /tmp/consul-web-ui.zip https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_web_ui.zip && \
cd /opt/consul-web-ui && \
unzip /tmp/consul-web-ui.zip && \
rm -f /tmp/consul-web-ui.zip && \
curl -Lso /tmp/consul-template.zip https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip && \
unzip /tmp/consul-template.zip -d /sbin/ && \
rm -f /tmp/consul-template.zip
ADD agent.json /etc/consul.d/
ADD start.sh /opt/consul/
ADD consul.ini /etc/supervisor.d/
RUN chmod +x /opt/consul/start.sh
EXPOSE 8500 8400 8300 8301 8301/udp 8302 8302/udp 8600 8600/udp
CMD /usr/bin/supervisord -n -c /etc/supervisor.d/supervisord.conf