-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.template
More file actions
33 lines (26 loc) · 1.61 KB
/
Dockerfile.template
File metadata and controls
33 lines (26 loc) · 1.61 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
30
31
32
33
FROM %%PARENT%%:%%VERSION_FULL%%
LABEL maintainer="Bandsintown Devops Team <devops@bandsintown.com>"
ENV S6_OVERLAY_VERSION=%%S6_OVERLAY_VERSION%% \
GODNSMASQ_VERSION=%%GODNSMASQ_VERSION%% \
CONSUL_TEMPLATE_VERSION=%%CONSUL_TEMPLATE_VERSION%% \
CONSUL_VERSION=%%CONSUL_VERSION%%
# Install root filesystem
COPY rootfs /
# Install base packages
RUN apk update && apk upgrade && \
apk-install curl wget bash tree jq bind-tools su-exec && \
chmod u+s /sbin/su-exec && \
curl -Ls https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-amd64.tar.gz | tar -xz -C / && \
curl -Ls https://releases.hashicorp.com/consul-template/${CONSUL_TEMPLATE_VERSION}/consul-template_${CONSUL_TEMPLATE_VERSION}_linux_amd64.zip -o consul-template.zip && unzip consul-template.zip -d /usr/local/bin && \
curl -Ls https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip -o consul.zip && unzip consul.zip -d /usr/local/bin && \
curl -Ls https://github.com/janeczku/go-dnsmasq/releases/download/${GODNSMASQ_VERSION}/go-dnsmasq-min_linux-amd64 -o /usr/sbin/go-dnsmasq && \
rm -f consul* && \
chmod +x /usr/sbin/go-dnsmasq && \
echo -ne "Alpine Linux %%VERSION_FULL%% image. (`uname -rsv`)\n" >> /root/.built && \
echo -ne "- with S6 Overlay: $S6_OVERLAY_VERSION, GoDnsMasq: $GODNSMASQ_VERSION, Consul Template: $CONSUL_TEMPLATE_VERSION, Consul: $CONSUL_VERSION\n" >> /root/.built
# Disable S6 logs on stdout/stderr
ENV S6_LOGGING=1
# Enable S6 as default entrypoint
ENTRYPOINT ["/init"]
# Define bash as default command
CMD ["bash"]