-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Can't interpolate in docker dns_servers field #1214
Comments
Greetings @diptanu - any idea when this will be worked on? |
For posterity, the way I ended up doing this was to set "--dns=${NODE_IP}" on the args for the docker daemon. |
@kyhavlov how did you configure consul/dnsmasq on the host? |
@rokka-n I set consul's |
Thank you, all worked. |
Fixed in 0.5.0: #1965 |
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. |
Nomad version
Nomad v0.3.2
Issue
Nomad doesn't seem to interpolate variables in the dns_servers field; the list of DNS servers doesn't get provided to the container until runtime so Nomad should have access to them at that point. It also won't work with 'meta' fields or environment variables.
What I'm trying to do is pass the ip of the node so that the container can use the local consul agent for DNS. If there's another way to pass the address in dynamically that would work too, but I couldn't find one.
Nomad Server logs (if appropriate)
[ERR] driver.docker: invalid ip address for container dns server: ${attr.unique.network.ip-address}
Job file (if appropriate)
The text was updated successfully, but these errors were encountered: