haproxy

An image used as a high-performance TCP and HTTP load balancer and reverse proxy.

nginx
traefik
envoy
caddy

What is haproxy?

The HAProxy image packages HAProxy, a widely used open-source load balancer and reverse proxy. It is designed for high availability, performance, and reliability, and is frequently deployed to distribute traffic across backend servers, provide failover, and secure applications.

HAProxy supports features like SSL termination, rate limiting, health checks, connection pooling, and observability through detailed metrics and logging. Because of its speed and configurability, it is commonly used in both small-scale deployments and large-scale enterprise environments.

In containerized ecosystems, HAProxy is often deployed as an ingress controller or as a service gateway in front of microservices.

How to use this image

The HAProxy image can be used to run the load balancer with a mounted configuration file.

Examples:

<code># Run HAProxy with a local configuration file
docker run --rm -v $PWD/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro haproxy:2.9</code>

<code># Expose HAProxy on port 80
docker run -d -p 80:80 -v $PWD/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro haproxy:2.9</code>

<code># Check the HAProxy version
docker run --rm haproxy:2.9 haproxy -v</code>

In Kubernetes, HAProxy is often deployed using a Helm chart or as the HAProxy Ingress Controller, which integrates directly with Kubernetes resources.

{{cta2}}

Image variants

The HAProxy image is generally released under the haproxy repository and published in these forms:

haproxy:<version>

Version-pinned images (e.g., haproxy:2.9.5) are recommended for production deployments.

haproxy:latest

Tracks the most recent stable release. Suitable for evaluation and testing but not ideal for production use due to version drift.

haproxy:alpine

A lightweight variant built on Alpine Linux. This reduces image size and attack surface, making it attractive for minimal container environments.

haproxy:lts

Long-term support releases that receive extended maintenance. These are preferred for enterprises that prioritize stability and predictable upgrade cycles.

Interested in base images that start and stay clean?

This is a not a valid email
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Interested in a CVE-free haproxy?

Pull echo’s haproxy image for a CVE-free base. Automatically patched and hardened for you.