Answers: <p>Make sure you connect your traefik instance to the client docker-network (as specified on the bottom of <a href="https://docs.traefik.io/configuration/backends/docker/" rel="nofollow noreferrer">this page</a>):</p>
  
  <pre><code>When running inside a container, Træfik will need network access through:
  
  docker network connect &lt;network&gt; &lt;traefik-container&gt;
  </code></pre>
  
Answers: CC BY-SA 3.0
Answers: 2018-01-30T16:24:24.323Z
Answers: I have updated my question, in particular the issue does not seem to be based on network connection.
Answers: Btuman
Answers: CC BY-SA 3.0
Answers: 2018-01-30T13:53:23.103Z
Answers: 2018-01-30T13:53:23.103Z
Answers: Wietse
Body: <p>Edit: I have updated my configuration to reflect <a href="https://www.praqma.com/stories/Proxying-Docker-containers-with-ease/" rel="nofollow noreferrer">Henrik Hoegh's tutorial</a>. I am still running into issues. </p>
  
  <p>I am setting up a local development environment with lots of docker containers running applications. I am using Traefik to manage and locally proxy these containers (each container having a named local URL). Right now my setup is as follows </p>
  
  <p><strong>Traefik.toml</strong></p>
  
  <pre><code>[web]
    address = ":8088"
    [web.statistics]
  
  ################################################################
  # Docker configuration backend
  ################################################################
  [docker]
  
  endpoint = "unix:///var/run/docker.sock"
  domain = "local.io"
  watch = true
  
  # Expose containers by default in traefik
  exposedbydefault = true
  
  # Use the IP address from the bound port instead of the inner network one. For specific use-case :)
  usebindportip = true
  
  # Use Swarm Mode services as data provider
  swarmmode = false
  </code></pre>
  
  <p>Docker-compose.yml file for container </p>
  
  <pre><code>... 
  container_name: mcserviceface
  labels:
    - "traefik.port=8080"
  ...
  </code></pre>
  
  <p>I also have added <code>local.io</code> and <code>mcserviceface.local.io</code> (both pointing to my local machine) to my <code>ect/hosts</code> file. </p>
  
  <p>When I start up the Traefik container and the mcserviceface container, it shows up on the Traefik dashboard, but it does not show the URL as <code>mcserviceface.local.io</code> rather something like <code>http://185.28.0.3:80</code>. I also hit a <code>ERR_CONNECTION_TIMED_OUT</code> when I follow that link. </p>
  
  <p>How do I resolve both of these issues?</p>
  
  <p>Edit: I have made sure that both containers on are on the same docker network via <code>docker network connect ...</code>. It does not resolve the issue. </p>
  
Comments: CC BY-SA 4.0
Comments: 2018-05-07T18:45:32.530Z
Comments: Do not use `docker network connect` for this, instead the container should join the network as part of it's creation, preferably inside the compose file. And you'll also want to pass the `traefik.docker.network` label to specify which network if the container is on more than one.
Comments: BMitch
Tags: <docker><docker-compose>
Title: Traefik configuration issue with local proxy
UserDisplayName: Btuman
ThreadText: # Traefik configuration issue with local proxy
  
  (Asked by: username_0 on 2018-01-24)
  
  Edit: I have updated my configuration to reflect [Henrik Hoegh's tutorial](https://www.praqma.com/stories/Proxying-Docker-containers-with-ease/). I am still running into issues.
  
  I am setting up a local development environment with lots of docker containers running applications. I am using Traefik to manage and locally proxy these containers (each container having a named local URL). Right now my setup is as follows
  
  **Traefik.toml**
  
  ```
  [web]
    address = ":8088"
    [web.statistics]
  
  ################################################################
  # Docker configuration backend
  ################################################################
  [docker]
  
  endpoint = "unix:///var/run/docker.sock"
  domain = "local.io"
  watch = true
  
  # Expose containers by default in traefik
  exposedbydefault = true
  
  # Use the IP address from the bound port instead of the inner network one. For specific use-case :)
  usebindportip = true
  
  # Use Swarm Mode services as data provider
  swarmmode = false
  
  ```
  
  Docker-compose.yml file for container
  
  ```
  ... 
  container_name: mcserviceface
  labels:
    - "traefik.port=8080"
  ...
  
  ```
  
  I also have added `local.io` and `mcserviceface.local.io` (both pointing to my local machine) to my `ect/hosts` file.
  
  When I start up the Traefik container and the mcserviceface container, it shows up on the Traefik dashboard, but it does not show the URL as `mcserviceface.local.io` rather something like `http://185.28.0.3:80`. I also hit a `ERR_CONNECTION_TIMED_OUT` when I follow that link.
  
  How do I resolve both of these issues?
  
  Edit: I have made sure that both containers on are on the same docker network via `docker network connect ...`. It does not resolve the issue.
  
  **Tags:** docker, docker-compose
  
  > **Comments:**
  > **username_1**: Do not use `docker network connect` for this, instead the container should join the network as part of it's creation, preferably inside the compose file. And you'll also want to pass the `traefik.docker.network` label to specify which network if the container is on more than one.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-01-30. Score: 1
  
  Make sure you connect your traefik instance to the client docker-network (as specified on the bottom of [this page](https://docs.traefik.io/configuration/backends/docker/)):
  
  ```
  When running inside a container, Træfik will need network access through:
  
  docker network connect <network> <traefik-container>
  
  ```
  
  > **Comments:**
  > **username_0**: I have updated my question, in particular the issue does not seem to be based on network connection.  
  
  ---
  
  