HAProxy Enterprise Documentation 2.1r1
Docker
A Docker image is a file that comprises instructions for a complete and executable version of a program in a Docker container.
HAProxy Enterprise is available as a Docker image, with these variants:
Image | Description |
hapee-registry.haproxy.com/hapee-business | HAProxy Enterprise base image |
hapee-plus-registry.haproxy.com/hapee-business-plus | HAProxy Enterprise with additional modules and libraries |
hapee-plus-registry.haproxy.com/hapee-stkagg | Image based on hapee-business-plus, but with the Stick Table Aggregator as the main process |
Install the HAProxy Enterprise base image
The hapee-business Docker image is a base image for HAProxy Enterprise without any additional modules. Follow these steps to install it:
-
Log into the hapee-registry.haproxy.com Docker registry, using the key you were given when you registered as the username and password.
$ sudo docker login https://hapee-registry.haproxy.com
-
Pull the HAProxy Enterprise image.
$ sudo docker pull hapee-registry.haproxy.com/hapee-business:2.1r1
-
Create an HAProxy Enterprise configuration file (i.e. hapee-lb.cfg) that defines your load balancer settings.
Tip
You can run a container temporarily, just to get the HAProxy Enterprise configuration file from it to use as a starting point.
$ sudo docker run --rm -d --name hapee hapee-registry.haproxy.com/hapee-business:2.1r1
$ sudo docker cp hapee:/etc/hapee-2.1 ./
$ sudo docker stop hapee
-
Start the Docker container, referencing the directory containing your configuration file as a volume by using the -v
flag.
$ sudo docker run \
--name hapee-2.1 \
-d \
-p 80:80 \
-p 443:443 \
-v $(pwd):/etc/hapee-2.1 \
--restart=unless-stopped \
hapee-registry.haproxy.com/hapee-business:2.1r1
Install the HAProxy Enterprise Plus image
The hapee-business-plus Docker image is HAProxy Enterprise with the following, additional modules and libraries installed:
-
Log into the hapee-plus-registry.haproxy.com Docker registry, using the key you were given when you registered as the username and password.
$ sudo docker login https://hapee-plus-registry.haproxy.com
-
Pull the HAProxy Enterprise image.
$ sudo docker pull hapee-plus-registry.haproxy.com/hapee-business-plus:2.1r1
Create an HAProxy Enterprise configuration file (i.e. hapee-lb.cfg) that defines your load balancer settings.
-
Start the Docker container, referencing the directory containing your configuration file as a volume by using the -v
flag.
$ sudo docker run \
--name hapee-2.1 \
-d \
-p 80:80 \
-p 443:443 \
-v $(pwd):/etc/hapee-2.1 \
--restart=unless-stopped \
hapee-plus-registry.haproxy.com/hapee-business-plus:2.1r1
Reload the container
When you make changes to the configuration file, you will need to reload the container before they'll take effect.
-
Make sure that the following line is included in the global
section of your HAProxy Enterprise configuration file. It ensures that you can perform a hitless reload, which means no traffic is dropped.
global
stats socket /tmp/stats expose-fd listeners
-
Restart the Docker container with this command:
$ sudo docker kill --signal USR2 hapee-2.1
Next up
Install Additional Packages