Skip to content

mkaag/docker-haproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

haproxy Dockerfile

Docker Hub

This repository contains the Dockerfile and the configuration files of Haproxy for Docker.

Base Docker Image

Installation

docker build -t mkaag/haproxy github.com/mkaag/docker-haproxy

Usage

Basic usage

docker run -d -p 443:443 -p 80:80 -p 1936:1936 mkaag/haproxy

The TCP 1936 is used here for Haproxy stats only.

Using SSL

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

Using custom config file

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

Custom config w/ SSL

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

About

haproxy Dockerfile w/ custom config and SSL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published