{"action":"closed","issue":{"url":"https://api.github.com/repos/hashicorp/nomad/issues/1948","repository_url":"https://api.github.com/repos/hashicorp/nomad","labels_url":"https://api.github.com/repos/hashicorp/nomad/issues/1948/labels{/name}","comments_url":"https://api.github.com/repos/hashicorp/nomad/issues/1948/comments","events_url":"https://api.github.com/repos/hashicorp/nomad/issues/1948/events","html_url":"https://github.com/hashicorp/nomad/issues/1948","id":187598763,"number":1948,"title":"Docker: --network-alias support","user":{"login":"passcod","id":155787,"avatar_url":"https://avatars.githubusercontent.com/u/155787?v=3","gravatar_id":"","url":"https://api.github.com/users/passcod","html_url":"https://github.com/passcod","followers_url":"https://api.github.com/users/passcod/followers","following_url":"https://api.github.com/users/passcod/following{/other_user}","gists_url":"https://api.github.com/users/passcod/gists{/gist_id}","starred_url":"https://api.github.com/users/passcod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/passcod/subscriptions","organizations_url":"https://api.github.com/users/passcod/orgs","repos_url":"https://api.github.com/users/passcod/repos","events_url":"https://api.github.com/users/passcod/events{/privacy}","received_events_url":"https://api.github.com/users/passcod/received_events","type":"User","site_admin":false},"labels":[{"id":266750359,"url":"https://api.github.com/repos/hashicorp/nomad/labels/driver/docker","name":"driver/docker","color":"c7def8","default":false},{"id":218895785,"url":"https://api.github.com/repos/hashicorp/nomad/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-06T23:33:00Z","updated_at":"2016-12-19T22:18:03Z","closed_at":"2016-12-19T22:18:03Z","body":"In user-defined networks the `--network-alias` can be useful to manage service discovery within e.g. Docker overlay networks. Two containers having the same Network Alias results in multiple addresses listed under that alias.\r\n\r\nE.g. a scheme we have currently under Nomad 0.4.0 (done by building our own `raw_exec`-based driver) is to give each container four aliases like this:\r\n\r\n```\r\nn${ALLOC_INDEX}.${TASK_NAME}.${GROUP_NAME}.${JOB_NAME}\r\n${TASK_NAME}.${GROUP_NAME}.${JOB_NAME}\r\n${GROUP_NAME}.${JOB_NAME}\r\n${JOB_NAME}\r\n```\r\n\r\nsuch that we can easily route traffic to any single container, or to a random container in a task or group. (The last alias is not particularly useful for service discovery, but is required so that DNS queries resolve for its subdomains.)\r\n\r\nNomad 0.5.0-rc1 has all the features we need to drop our custom driver, except support for Docker network aliases. I acknowledge that it is probably too late for this to be included in 0.5.0, but we can workaround. Nevertheless, it would be a useful feature."}}
{"actor":{"display_login":"dadgar"}}