/
Dockerfile
34 lines (29 loc) · 1.13 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
FROM joramk/fc27-base
MAINTAINER joramk@gmail.com
ENV container docker
LABEL name="Fedora - HAproxy 1.8 with Lets Encrypt" \
vendor="https://github.com/joramk/fc27-haproxy" \
license="none" \
build-date="20180304" \
maintainer="joramk" \
issues="https://github.com/joramk/fc27-haproxy/issues"
RUN { yum update -y; \
yum install fedora-repos-rawhide incron openssl certbot cronie procps-ng iputils socat yum-cron -y; \
yum --nogpg --disablerepo=* --enablerepo=rawhide --releasever=28 install haproxy -y; \
yum clean all && rm -rf /var/cache/yum; \
}
COPY docker-entrypoint.sh /
COPY scripts/certbot-* /usr/local/sbin/
COPY haproxy.cron /etc/cron.daily/
RUN { systemctl enable haproxy crond; \
systemctl disable auditd; \
chmod +rx /docker-entrypoint.sh /etc/cron.daily/haproxy.cron; \
chmod 700 /usr/local/sbin/certbot-*; \
mkdir -p /etc/letsencrypt/live; \
}
HEALTHCHECK CMD systemctl -q is-active haproxy || exit 1
STOPSIGNAL SIGRTMIN+3
EXPOSE 80 443
VOLUME [ “/sys/fs/cgroup”, "/etc/haproxy", "/etc/letsencrypt" ]
ENTRYPOINT [ "/docker-entrypoint.sh" ]
CMD [ "/sbin/init" ]