You can specify which Docker API Endpoint to use with the directive endpoint. Traefik requires access to the docker socket to get its dynamic configuration. The bridge interface ( docker0 by default): -add-host=:172.17.0.1 Docker API Access ¶ For example, to set it to the IP address of On Linux, for versions of Docker older than 20.10.0, for to be defined, it should be providedĪs an extra_host to the Traefik container, using the -add-host flag. if the lookup was unsuccessful, fall back to 127.0.0.1.The IP address of the host is resolved as follows: When exposing containers that are configured with host networking, (Read more on this label in the dedicated section in routing). Or does not expose any port, then you must manually specify which port Traefik should use for communicationīy using the label .server.port
Then Traefik uses this port for private communication. Traefik retrieves the private IP and port of containers from the Docker API. That is able to define a Docker container with labels can work Please note that any tool like Nomad, Terraform, Ansible, etc.