This repository contains the Dockerfile and the configuration files of Haproxy for Docker.
- phusion/baseimage, the minimal Ubuntu base image modified for Docker-friendliness...
- ...including image's enhancement from Paul Querna
docker build -t mkaag/haproxy github.com/mkaag/docker-haproxy
docker run -d -p 443:443 -p 80:80 -p 1936:1936 mkaag/haproxy
The TCP 1936 is used here for Haproxy stats only.
The PEM file must contains the public, private keys as well as any intermediary certificate.
docker run -d \
-v /opt/haproxy/ssl:/etc/ssl/private \
-e "SSL_CERT=/etc/ssl/private/cert.pem" \
-p 443:443 -p 80:80 -p 1936:1936 \
mkaag/haproxy
docker run -d \
-v /opt/haproxy/etc:/apps \
-e "HAPROXY_CONFIG=/apps/haproxy.cfg" \
-p 443:443 -p 80:80 -p 1936:1936 \
mkaag/haproxy
docker run -d \
-v /opt/haproxy/etc:/apps \
-v /opt/haproxy/ssl:/etc/ssl/private \
-e "HAPROXY_CONFIG=/apps/haproxy.cfg" \
-e "SSL_CERT=/etc/ssl/private/cert.pem" \
-p 443:443 -p 80:80 -p 1936:1936 \
mkaag/haproxy