Docker provider does not detect exposed port

Hello :slight_smile:

I'm new to Traefik, going through the Docker Quick Start: Docker and Traefik Quick Start - Traefik .

What did you do?

When trying to test my setup, I get a 404:

❯ curl http://whoami.localhost
404 page not found

The Traefik service logged an error when I started the Whoami service:

traefik-1  | 2026-02-12T11:09:56Z ERR error="service \"whoami-traefik\" error: port is missing" container=whoami-traefik-a8ad089214719afa6565adcddb17b1c74b99f22147a4c497397c54bcf6ed8488 providerName=docker

According to the documentation for the Docker provider ( Traefik Docker Documentation - Traefik ): "If a container exposes a single port, then Traefik uses this port."

The traefok/whoami:latest image (as of now, latest is v1.11) does expose port 80:

❯ docker inspect --format='{{.Config.ExposedPorts}}' traefik/whoami:latest
map[80/tcp:{}]

I managed to fix my issue by adding this label to the Whoami service: "traefik.http.services.whoami.loadbalancer.server.port=80".

I am not sure if this is a Docker or a Traefik issue.

What did you see instead?

I expected Traefik to detect the port exposed by the Whoami service, and not have to add a label to the Whoami service.

What version of Traefik are you using?

The image is traefik:v3.6.

❯ docker run traefik:v3.6 version
Version:      3.6.8
Codename:     ramequin
Go version:   go1.25.7
Built:        2026-02-11T16:35:44Z
OS/Arch:      linux/arm64

What is your environment & configuration?

❯ docker --version
Docker version 28.3.0, build 38b7060
❯ uname -a
Darwin L437 24.6.0 Darwin Kernel Version 24.6.0: Wed Nov  5 21:28:03 PST 2025; root:xnu-11417.140.69.705.2~1/RELEASE_ARM64_T8122 arm64

Do you have any idea what is happening? Thank you!

This is a community forum, users supporting users.

If you think this is a bug, you better check with the devs at Traefik Github.

Hi! I was told to post here :frowning: Docker provider does not detect exposed port · Issue #12661 · traefik/traefik · GitHub

EDIT: I do think it is a bug, but I have no experience with Traefik so maybe something with my setup is wrong.

Ok, it works for me on latest Debian, latest Docker, latest Traefik, even when removing port label (simple Traefik example).

How do you run Docker on Mac? Via Docker Desktop? Because usually a VM is created to run Linux containers, so there is some extra isolation.

Ok, I updated Docker Desktop (and so docker) to the latest version, and now it works :slight_smile:.

❯ docker --version
Docker version 29.2.0, build 0b9d198

I quickly skimmed through Docker Engine and Desktop release notes to find out why, without success… Anyway, thank you!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.