I have a number of containers (home assistant, esphome, etc) that use the host network (all running via docker-compose).
I use the docker provider with these containers in the standard manner, but in order for traefik to proxy to them correctly I added
extra_hosts:
- "host.docker.internal:host-gateway
to the traefik docker compose. This works like a charm, and the system performs as expected.
My question is about the warnings I'm getting in the traefik logs periodically:
2024-09-15T17:06:21Z WRN Could not find network named "t3_proxy" for container "/home-assistant-homeassistant-1". Maybe you're missing the project's prefix in the label? container=homeassistant-home-assistant-1a19ab55b5d58f3e0087ad8831c2e14d4897a2d206fa8e398be9439e24bbc9c9 providerName=docker serviceName=home-assistant-svc
I get 5-10 of these messages an hour for each container with host networking mode that uses the docker provider.
t3_proxy is my traefik docker network, so I understand the warning. I tried adding the network to one of the docker composes in question (as an external network definition), but the warning still persists, noticing (quite reasonably) that the container with the label annotations isn't bound to t3_proxy (because it's using host networking mode)
I could use a file provider, but part of why I'm using traefik is for the docker provider, and, well, it works, it just spams the logs.
I just want to
- Make sure I'm not missing something that will cause this to die a horrible death (I'm using single node docker, no swarm)
- Find out if there is any way to quiet these error messages (docker label annotation, etc) as they make the log file sort of unusable for identifying actual issues.
I'm currently on traefik 3.1.2