{"action":"closed","issue":{"url":"https://api.github.com/repos/containous/traefik/issues/568","repository_url":"https://api.github.com/repos/containous/traefik","labels_url":"https://api.github.com/repos/containous/traefik/issues/568/labels{/name}","comments_url":"https://api.github.com/repos/containous/traefik/issues/568/comments","events_url":"https://api.github.com/repos/containous/traefik/issues/568/events","html_url":"https://github.com/containous/traefik/issues/568","id":168361370,"number":568,"title":"Reaching containers in different docker networks","user":{"login":"tbcdns","id":1276068,"avatar_url":"https://avatars.githubusercontent.com/u/1276068?v=3","gravatar_id":"","url":"https://api.github.com/users/tbcdns","html_url":"https://github.com/tbcdns","followers_url":"https://api.github.com/users/tbcdns/followers","following_url":"https://api.github.com/users/tbcdns/following{/other_user}","gists_url":"https://api.github.com/users/tbcdns/gists{/gist_id}","starred_url":"https://api.github.com/users/tbcdns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbcdns/subscriptions","organizations_url":"https://api.github.com/users/tbcdns/orgs","repos_url":"https://api.github.com/users/tbcdns/repos","events_url":"https://api.github.com/users/tbcdns/events{/privacy}","received_events_url":"https://api.github.com/users/tbcdns/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/containous/traefik/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-29T16:18:45Z","updated_at":"2016-08-05T12:26:20Z","closed_at":"2016-08-05T12:26:20Z","body":"Hi,\r\n\r\nConsider the following basic example:\r\n\r\n```yaml\r\n---\r\nversion: '2'\r\n\r\nservices:\r\n  traefik:\r\n    image: traefik\r\n    command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG\r\n    ports:\r\n      - \"80:80\"\r\n      - \"8080:8080\"\r\n    volumes:\r\n      - /var/run/docker.sock:/var/run/docker.sock\r\n      - /dev/null:/traefik.toml\r\n\r\n  whoami1:\r\n    image: emilevauge/whoami\r\n    labels:\r\n      - \"traefik.backend=whoami\"\r\n      - \"traefik.frontend.rule=Host:whoami.docker.localhost\"\r\n\r\n  whoami2:\r\n    image: emilevauge/whoami\r\n    labels:\r\n      - \"traefik.backend=whoami\"\r\n      - \"traefik.frontend.rule=Host:whoami.docker.localhost\"\r\n```\r\n\r\nI start my containers:\r\n\r\n```bash\r\n$ docker-compose up -d\r\ndocker-compose up -d\r\nCreating testdock_traefik_1\r\nCreating testdock_whoami2_1\r\nCreating testdock_whoami1_1\r\n```\r\n\r\nI add a third \"whoami\" container directly with docker that I called whoami_out (out of docker-compose)\r\n\r\n```bash\r\n$ docker run -d --name whoami_out emilevauge/whoami\r\n```\r\nThey are all registered in traefik web ui:\r\n![image](https://cloud.githubusercontent.com/assets/1276068/17251840/9c318d58-55aa-11e6-9ec9-935c4cce7660.png)\r\n\r\nHowever traefik works only for the ones started with docker-compose:\r\n\r\n```bash\r\n$ curl -H Host:whoami.docker.localhost http://127.0.0.1\r\nHostname: dea890067ec8\r\nIP: 127.0.0.1\r\nIP: ::1\r\nIP: 172.19.0.3\r\nIP: fe80::42:acff:fe13:3\r\nGET / HTTP/1.1\r\nHost: whoami.docker.localhost\r\nUser-Agent: curl/7.43.0\r\n\r\nAccept: */*\r\nAccept-Encoding: gzip\r\nX-Forwarded-For: 172.19.0.1\r\nX-Forwarded-Host: whoami.docker.localhost\r\nX-Forwarded-Proto: http\r\nX-Forwarded-Server: 8a52baca04f9\r\n```\r\n\r\n```bash\r\n$ curl -H Host:whoami_out.docker.localhost http://127.0.0.1\r\nGateway Timeout\r\n```\r\n\r\nI understand that docker-compose creates its own network but is there a way to reach all containers?\r\n\r\nThanks for your help!\r\n"}}
{"actor":{"display_login":"emilevauge"}}