-
Notifications
You must be signed in to change notification settings - Fork 52
/
Dockerfile
48 lines (35 loc) · 1.51 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
# start from debian 9 slim version
FROM debian:stretch-slim
# enable backport repo
RUN echo deb http://httpredir.debian.org/debian stretch-backports main | tee /etc/apt/sources.list.d/backports.list
RUN apt-get update && apt-get install --no-install-recommends -yqq \
gnupg \
apt-transport-https \
cron \
wget \
ca-certificates \
curl \
&& apt-get install --no-install-recommends -yqq certbot -t stretch-backports \
&& apt-get install --no-install-recommends -yqq supervisor \
&& apt-get clean autoclean && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# install haproxy 1.9 from official debian repos (https://haproxy.debian.net/)
RUN curl https://haproxy.debian.net/bernat.debian.org.gpg | apt-key add -
RUN echo deb http://haproxy.debian.net stretch-backports-1.9 main | tee /etc/apt/sources.list.d/haproxy.list
RUN apt-get update \
&& apt-get install -yqq haproxy=1.9.\* -t stretch-backports \
&& apt-get clean autoclean && apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
# See https://github.com/janeczku/haproxy-acme-validation-plugin
COPY haproxy-acme-validation-plugin/acme-http01-webroot.lua /etc/haproxy
COPY haproxy-acme-validation-plugin/cert-renewal-haproxy.sh /
COPY crontab.txt /var/crontab.txt
RUN crontab /var/crontab.txt && chmod 600 /etc/crontab
COPY supervisord.conf /etc/supervisord.conf
COPY certs.sh /
COPY bootstrap.sh /
RUN mkdir /jail
EXPOSE 80 443
VOLUME /etc/letsencrypt
COPY haproxy.cfg /etc/haproxy/haproxy.cfg
ENTRYPOINT ["/bootstrap.sh"]