library/haproxy/1.8-alpine/Dockerfile

25 lines
701 B
Docker
Raw Permalink Normal View History

2018-10-27 03:58:37 +00:00
FROM haproxy:1.8-alpine
RUN apk add --update --no-cache openssl \
&& rm -rf /var/cache/apk/* \
&& mkdir -p /etc/haproxy/ \
&& mkdir -p /opt/haproxy/ \
&& mkdir -p /var/lib/haproxy \
&& touch /var/lib/haproxy/server-state \
&& cp -R /usr/local/etc/haproxy/errors /etc/haproxy/errors \
&& rm -rf /usr/local/etc/haproxy
COPY config/*.cfg /etc/haproxy/conf.d/
COPY bin/* /opt/haproxy/bin/
RUN chmod +x /opt/haproxy/bin/*.sh
EXPOSE 80 443 1936
ENV PATH "$PATH:/opt/haproxy/bin"
VOLUME /etc/haproxy/ssl/
VOLUME /etc/haproxy/sites/
ENTRYPOINT ["prepare-entrypoint.sh"]
CMD ["haproxy", "-f", "/etc/haproxy/conf.d", "-f", "/etc/haproxy/sites"]