library/haproxy/1.8-alpine/Dockerfile
crusader 1f98fc734c ing
2018-10-27 12:58:37 +09:00

25 lines
701 B
Docker

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"]