Public | Automated Build

Last pushed: 2 years ago
Short Description
haproxy Dockerfile w/ custom config and SSL
Full Description

haproxy Dockerfile

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
Docker Pull Command
Owner
mkaag
Source Repository

Comments (0)