-
Notifications
You must be signed in to change notification settings - Fork 185
/
Copy pathDockerfile
28 lines (24 loc) · 1.17 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
FROM smebberson/alpine-consul:1.1.0
MAINTAINER Scott Mebberson <scott@scottmebberson.com>
ENV CONSUL_TEMPLATE_VERSION=0.14.0
# Download and install Consul Template
RUN apk add --update curl && \
curl -sLo /tmp/consul-template.zip https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip && \
unzip -d /usr/sbin/ /tmp/consul-template.zip && \
rm /tmp/consul-template.zip && \
apk del curl && \
rm -rf /var/cache/apk/* && \
addgroup consul-template && \
adduser -D -g "" -s /bin/sh -G consul-template consul-template && \
addgroup s6 && \
addgroup consul s6 && \
addgroup consul-template s6
# Add the files
ADD root /
# For `s6-svc -h` to work properly we want to set proper group permissions
# see: /~https://github.com/just-containers/s6-overlay/issues/130#issuecomment-181956795
# Also fix permissions
RUN mkdir /etc/services.d/consul-template/supervise/ && \
mkfifo /etc/services.d/consul-template/supervise/control && \
chown -R root:s6 /etc/services.d/consul-template && \
chmod g+w /etc/services.d/consul-template/supervise/control /etc/services.d/consul-template