Installation
Install HAProxy Enterprise on Docker
Using HAProxy Fusion?
If you’re using HAProxy Fusion, then see the HAProxy Fusion - Nodes topic instead.
The HAProxy Enterprise Docker image lets you run the load balancer as a container.
Install the HAProxy Enterprise Docker container Jump to heading
The haproxy-enterprise Docker image hosts HAProxy Enterprise and the HAProxy Data Plane API. Follow these steps to install it.
-
If you don’t have a HAProxy Enterprise license key, get one by registering and requesting a free trial of HAProxy Enterprise at https://www.haproxy.com/downloads/hapee-trial/.
-
Log into the HAProxy Docker registry using your HAProxy Enterprise license key as both the username and password. You can also view this registry in your browser.
nixsudo docker login https://registry.haproxy.comnixsudo docker login https://registry.haproxy.comOur registry has moved!
In previous versions of this guide, we used the URL
https://hapee-registry.haproxy.com. -
Pull the HAProxy Enterprise image from the
haproxytechrepository.Install the Docker containernixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2nixsudo docker pull registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2 -
Create an HAProxy Enterprise configuration file,
hapee-lb.cfg, that defines your load balancer settings.You can run a container temporarily, just to get the HAProxy Enterprise configuration file from it to use as a starting point.
Create a starter configuration filenixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1sudo docker cp hapee-config:/etc/hapee-3.2 ./sudo docker stop hapee-configcd hapee-3.2nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1sudo docker cp hapee-config:/etc/hapee-3.2 ./sudo docker stop hapee-configcd hapee-3.2nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1sudo docker cp hapee-config:/etc/hapee-3.1 ./sudo docker stop hapee-configcd hapee-3.1nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1sudo docker cp hapee-config:/etc/hapee-3.1 ./sudo docker stop hapee-configcd hapee-3.1nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1sudo docker cp hapee-config:/etc/hapee-3.0 ./sudo docker stop hapee-configcd hapee-3.0nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1sudo docker cp hapee-config:/etc/hapee-3.0 ./sudo docker stop hapee-configcd hapee-3.0nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1sudo docker cp hapee-config:/etc/hapee-2.9 ./sudo docker stop hapee-configcd hapee-2.9nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1sudo docker cp hapee-config:/etc/hapee-2.9 ./sudo docker stop hapee-configcd hapee-2.9nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1sudo docker cp hapee-config:/etc/hapee-2.8 ./sudo docker stop hapee-configcd hapee-2.8nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1sudo docker cp hapee-config:/etc/hapee-2.8 ./sudo docker stop hapee-configcd hapee-2.8nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1sudo docker cp hapee-config:/etc/hapee-2.7 ./sudo docker stop hapee-configcd hapee-2.7nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1sudo docker cp hapee-config:/etc/hapee-2.7 ./sudo docker stop hapee-configcd hapee-2.7nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1sudo docker cp hapee-config:/etc/hapee-2.6 ./sudo docker stop hapee-configcd hapee-2.6nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1sudo docker cp hapee-config:/etc/hapee-2.6 ./sudo docker stop hapee-configcd hapee-2.6nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1sudo docker cp hapee-config:/etc/hapee-2.5 ./sudo docker stop hapee-configcd hapee-2.5nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1sudo docker cp hapee-config:/etc/hapee-2.5 ./sudo docker stop hapee-configcd hapee-2.5nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1sudo docker cp hapee-config:/etc/hapee-2.4 ./sudo docker stop hapee-configcd hapee-2.4nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1sudo docker cp hapee-config:/etc/hapee-2.4 ./sudo docker stop hapee-configcd hapee-2.4nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1sudo docker cp hapee-config:/etc/hapee-2.2 ./sudo docker stop hapee-configcd hapee-2.2nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1sudo docker cp hapee-config:/etc/hapee-2.2 ./sudo docker stop hapee-configcd hapee-2.2nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1sudo docker cp hapee-config:/etc/hapee-2.0 ./sudo docker stop hapee-configcd hapee-2.0nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1sudo docker cp hapee-config:/etc/hapee-2.0 ./sudo docker stop hapee-configcd hapee-2.0nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2sudo docker cp hapee-config:/etc/hapee-1.8 ./sudo docker stop hapee-configcd hapee-1.8nixsudo docker run --rm -d --name hapee-config registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2sudo docker cp hapee-config:/etc/hapee-1.8 ./sudo docker stop hapee-configcd hapee-1.8 -
Start the Docker container, referencing the directory containing your configuration file as a volume by using the
-vflag. Specify$(pwd)if the configuration file is in the current directory:Start the Docker containernixsudo docker run \--name hapee-3.2 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.2 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1nixsudo docker run \--name hapee-3.2 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.2 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1nixsudo docker run \--name hapee-3.1 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.1 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1nixsudo docker run \--name hapee-3.1 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.1 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1nixsudo docker run \--name hapee-3.0 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.0 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1nixsudo docker run \--name hapee-3.0 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-3.0 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1nixsudo docker run \--name hapee-2.9 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.9 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1nixsudo docker run \--name hapee-2.9 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.9 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1nixsudo docker run \--name hapee-2.8 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.8 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1nixsudo docker run \--name hapee-2.8 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.8 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1nixsudo docker run \--name hapee-2.7 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.7 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1nixsudo docker run \--name hapee-2.7 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.7 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1nixsudo docker run \--name hapee-2.6 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.6 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1nixsudo docker run \--name hapee-2.6 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.6 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1nixsudo docker run \--name hapee-2.5 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.5 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1nixsudo docker run \--name hapee-2.5 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.5 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1nixsudo docker run \--name hapee-2.4 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.4 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1nixsudo docker run \--name hapee-2.4 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.4 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1nixsudo docker run \--name hapee-2.2 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.2 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1nixsudo docker run \--name hapee-2.2 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.2 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1nixsudo docker run \--name hapee-2.0 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.0 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1nixsudo docker run \--name hapee-2.0 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-2.0 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1nixsudo docker run \--name hapee-1.8 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-1.8 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2nixsudo docker run \--name hapee-1.8 \-d \-p 80:80 \-p 443:443 \-p 5555:5555 \-p 5108-5118:5108-5118 \-v $(pwd):/etc/hapee-1.8 \--restart=unless-stopped \registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2
Access the Data Plane API Jump to heading
The Data Plane API listens at port 5555. However, you must retrieve the Basic authentication credentials to access it.
-
Use the following command to read the username and password from the Data Plane API configuration file:
Access the Data Plane APInixsudo docker exec -it hapee-3.2 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-3.2 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-3.1 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-3.1 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-3.0 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-3.0 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.9 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.9 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.8 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.8 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.7 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.7 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.6 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.6 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.5 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.5 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.4 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.4 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.2 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.2 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.0 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-2.0 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-1.8 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymlnixsudo docker exec -it hapee-1.8 grep user: -A3 /etc/hapee-extras/dataplaneapi.ymloutputyamluser:- insecure: truepassword: v7xkLr4Z4Qlcname: adminoutputyamluser:- insecure: truepassword: v7xkLr4Z4Qlcname: adminThen you can verify that the API is working by calling the
infofunction. In the example below, we use the username and password that we retrieved during the last step:nixcurl --request GET --user admin:v7xkLr4Z4Qlc http://localhost:5555/v3/infonixcurl --request GET --user admin:v7xkLr4Z4Qlc http://localhost:5555/v3/infooutputjson{"api":{"build_date":"2025-07-11T15:43:53.000Z","version":"v3.0.12-ee2 b3359a8f"},"system":{}}outputjson{"api":{"build_date":"2025-07-11T15:43:53.000Z","version":"v3.0.12-ee2 b3359a8f"},"system":{}}
Reload or stop the services Jump to heading
When you change your hapee-lb.cfg configuration file, you will need to reload the service for the changes to take effect. We use s6-overlay to run HAProxy Enterprise and the HAProxy Data Plane API as services.
Reload the services Jump to heading
To reload the services, follow these steps.
-
Make sure that the following line is included in the
globalsection of your HAProxy Enterprise configuration file. It ensures that you can perform a hitless reload, which means no traffic is dropped.Modify global sectionhaproxyglobalstats socket /var/run/hapee-3.2/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-3.2/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-3.1/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-3.1/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-3.0/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-3.0/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.9/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.8/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.8/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.7/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.7/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.6/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.6/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.5/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.5/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.4/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.4/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.2/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.2/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.0/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-2.0/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-1.8/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listenershaproxyglobalstats socket /var/run/hapee-1.8/hapee-lb.sock user hapee-lb group hapee mode 660 level admin expose-fd listeners -
Reload the HAProxy Enterprise process with this command:
Reload the servicesnixsudo docker exec hapee-3.2 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-3.2 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-3.1 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-3.1 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-3.0 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-3.0 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.9 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.9 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.8 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.8 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.7 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.7 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.6 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.6 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.5 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.5 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.4 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.4 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.2 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.2 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.0 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-2.0 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-1.8 s6-svc -2 /var/run/s6/services/haproxynixsudo docker exec hapee-1.8 s6-svc -2 /var/run/s6/services/haproxyThe
-2argument sends aSIGUSR2signal to the HAProxy Enterprise container, and when the load balancer receives the signal it will reload. -
Optional: To restart the Data Plane API, use this command:
Restart the Data Plane APInixsudo docker exec hapee-3.2 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-3.2 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-3.1 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-3.1 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-3.0 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-3.0 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.9 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.9 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.8 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.8 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.7 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.7 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.6 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.6 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.5 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.5 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.4 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.4 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.2 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.2 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.0 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-2.0 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-1.8 s6-svc -t /var/run/s6/services/dataplaneapinixsudo docker exec hapee-1.8 s6-svc -t /var/run/s6/services/dataplaneapi
Stop the services Jump to heading
To perform a graceful shutdown of the load balancer you can issue this command.
nixsudo docker exec hapee-3.2 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.2 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.1 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.1 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.0 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.0 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.9 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.9 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.8 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.8 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.7 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.7 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.6 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.6 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.5 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.5 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.4 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.4 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.2 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.2 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.0 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.0 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-1.8 s6-svc -1 /var/run/s6/services/haproxy
nixsudo docker exec hapee-1.8 s6-svc -1 /var/run/s6/services/haproxy
The -1 argument sends a SIGUSR1 signal to the HAProxy Enterprise container. Upon receiving the signal, the load balancer unbinds its listening ports so that it won’t receive any additional connections, but will continue processing existing connections until all connections close. After all connections have closed, the load balancer process terminates gracefully.
Tip
You can configure the maximum time the load balancer will wait for connections to close after issuing the command for a graceful shutdown. Use the global directive hard-stop-after, specifying the desired maximum time (default: milliseconds). For example, to set the maximum time to 30 seconds, add the following line to the global section in your load balancer configuration.
haproxyglobalhard-stop-after 30s
haproxyglobalhard-stop-after 30s
If needed, you can perform a hard restart by issuing the following command:
nixsudo docker exec hapee-3.2 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.2 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.1 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.1 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.0 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-3.0 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.9 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.9 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.8 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.8 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.7 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.7 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.6 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.6 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.5 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.5 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.4 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.4 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.2 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.2 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.0 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-2.0 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-1.8 s6-svc -t /var/run/s6/services/haproxy
nixsudo docker exec hapee-1.8 s6-svc -t /var/run/s6/services/haproxy
The -t argument sends a SIGTERM signal to the HAProxy Enterprise container. When the load balancer receives the SIGTERM signal, it doesn’t shut down gracefully, but rather, it immediately terminates and closes all established connections. Note that performing a hard restart in this way may result in dropped traffic.
Installing with a custom Dockerfile Jump to heading
To install a modified HAProxy Enterprise environment, create a custom Dockerfile. For information on creating Dockerfiles, see the Docker guide Writing a Dockerfile.
-
In your Dockerfile, specify the desired HAProxy Enterprise base image as in the following example:
Install with a custom DockerfiledockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2dockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2 -
Add any further Dockerfile commands as needed. The following example starts from the HAProxy Enterprise image, then includes a custom set of tools. The custom tool installation script,
install_mytools-4.3.sh, must reside in the current directory and have executable permissions.Customize the DockerfiledockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.2r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.1r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:3.0r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.9r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.8r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.7r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.6r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.5r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.4r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.2r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:2.0r1# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".shdockerFROM registry.haproxy.com/haproxytech/haproxy-enterprise:1.8r2# install internal toolsWORKDIR /tmpARG mytools_version="4.3"COPY install_mytools-"$mytools_version".sh .RUN /tmp/install_mytools-"$mytools_version".sh
See also Jump to heading
- To set the maximum amount of time allowed for a clean soft-stop, see hard-stop-after reference.
- For complete information on stopping and restarting HAProxy, see the Management Guide.