Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: --network-alias support #1948

Closed
passcod opened this issue Nov 6, 2016 · 4 comments
Closed

Docker: --network-alias support #1948

passcod opened this issue Nov 6, 2016 · 4 comments

Comments

@passcod
Copy link

passcod commented Nov 6, 2016

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.

E.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:

n${ALLOC_INDEX}.${TASK_NAME}.${GROUP_NAME}.${JOB_NAME}
${TASK_NAME}.${GROUP_NAME}.${JOB_NAME}
${GROUP_NAME}.${JOB_NAME}
${JOB_NAME}

such 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.)

Nomad 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.

@dadgar
Copy link
Contributor

dadgar commented Nov 7, 2016

Hey, if you are comfortable with Go, would love a PR

@passcod
Copy link
Author

passcod commented Nov 8, 2016

I'll have a go, but it's been years…

@dadgar
Copy link
Contributor

dadgar commented Dec 19, 2016

Fixed by #1980

@dadgar dadgar closed this as completed Dec 19, 2016
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants