traefik

An image that discovers services from Docker, Kubernetes, Consul, Nomad, and other providers, routing traffic based on rules defined in labels or annotations.

nginx
haproxy
envoyproxy/envoy
caddy

What is traefik image?

The traefik image runs Traefik, a modern, cloud-native reverse proxy and load balancer designed for dynamic containerized environments. Traefik automatically discovers services from Docker, Kubernetes, Consul, Nomad, and other providers, routing traffic based on rules defined in labels or annotations.

Unlike traditional proxies that require static configuration, Traefik continuously monitors service registries and updates routes in real time. It natively supports HTTPS with automatic Let’s Encrypt certificate generation, traffic mirroring, rate limiting, retries, circuit breakers, and observability integrations such as Prometheus and OpenTelemetry.

This image is frequently used in microservice architectures to manage ingress traffic, provide TLS termination, and centralize routing logic. Traefik’s lightweight footprint and dynamic configuration model make it a popular choice for Kubernetes ingress controllers, Docker Swarm setups, and edge gateways in hybrid or multi-cloud environments.

How to use this image

The traefik image can be run as a standalone reverse proxy, as a Docker service with dynamic configuration, or as a Kubernetes Ingress Controller.

Run with a static config file:

docker run -d -p 80:80 -p 8080:8080 \ -v $(pwd)/traefik.yml:/etc/traefik/traefik.yml \ -v /var/run/docker.sock:/var/run/docker.sock \ traefik:v3.1

Example traefik.yml:

entryPoints: web: address: ":80" providers: docker: {} api: dashboard: true

Run in Kubernetes:

Traefik can be installed as an ingress controller via Helm:

helm repo add traefik https://traefik.github.io/charts helm install traefik traefik/traefik --namespace traefik --create-namespace

Logs are written to stdout, and metrics can be exposed for monitoring. The dashboard (enabled with the API) runs on port 8080 by default, allowing real-time visualization of routes and services.

Image variants

Published under traefik, the image is available in multiple variants:

  • traefik:latest
    Tracks the most recent stable version.
    Best for testing or non-critical environments.
  • traefik:<version>
    Tagged by semantic version (e.g. v3.1, v2.11).
    Recommended for production deployments to ensure predictable behavior.
  • traefik:<version>-alpine
    Lightweight Alpine-based variant with a reduced image size.
    Ideal for minimal environments with limited footprint.

Traefik images are regularly rebuilt to include upstream updates and security patches. Version pinning (e.g. traefik:v3.1.1-alpine) is recommended for stability.

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.