-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Allow specifying container IP with docker driver #2535
Conversation
What is the use case of this? |
We run dns servers in docker containers which need to be started with a specific IP addresses. We've been doing this with docker for quite a while, but would like to start using nomad to schedule our containers on our hosts. |
And to be clear this is in a docker, user defined network? |
That is how we use it, yes. But the https://docs.docker.com/engine/reference/run/#network-settings |
@clinta we will probably want to restrict that to non "host" networks. Otherwise the scheduler will be incorrectly accounting IPs. |
Actually, I was wrong. The documentation does not indicate that there are any restrictions, but I just tried it for testing and it is indeed only permitted on user defined networks.
|
@@ -144,6 +144,12 @@ The `docker` driver supports the following configuration in the job spec: | |||
} | |||
``` | |||
|
|||
* `ipv4_address` - (Optional) The IPv4 address to be used for the container. In |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you update this make it clear that it only works on user defined networks.
Thanks! |
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
The ability to specify a container IP was added in docker 1.13.0. This PR exposes those options to nomad.