Public Repository

Last pushed: 2 years ago
Short Description
Alpine image with HAProxy
Full Description

Tags & Dockerfile

What is HAProxy?

HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for very high traffic web sites and powers quite a number of the world's most visited ones.


Since each HAProxy usage its different and will require an appropriate configuration file, this image comes with no default one. There are several approaches to use your own configuration file with this image.

Use your own image

  • Create a Dockerfile
FROM jfusterm/haproxy:1.6.5
COPY haproxy.cfg /haproxy/etc
  • Build the image
$ docker build -t my-haproxy:1.6.5 .
  • Run the container
$ docker run -d --name my-haproxy -p 80:80 my-haproxy:1.6.5

Copy the haproxy.cfg to the container

  • Create the container
$ docker create --name haproxy -p 80:80 jfusterm/haproxy:1.6.5
  • Copy the configuration file to the container
$ docker cp haproxy.cfg haproxy:/haproxy/etc
  • Start the container
$ docker start haproxy

Bind mount the configuration file

$ docker run --name haproxy -p 80:80 -v /dir/haproxy.cfg:/haproxy/etc/haproxy.cfg jfusterm/haproxy:1.6.5
Docker Pull Command