-
Notifications
You must be signed in to change notification settings - Fork 18.6k
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
Network information in service templates + templates for command parameter #37745
Comments
Hi, This would be very nice to have. I asked for this on slack: https://dockercommunity.slack.com/archives/C24JP46TE/p1692628670074129 .
I got a reply with a solution involving some bash commands but it comes with a cost.
|
Another comment on slack that is relevant:
|
Perhaps one way to have this is to have the data mounted inside the container as a file ?! |
Right now
docker service create
supportstext/template
templates on a handful of parameters. It would be great if more arguments could be templated, and if more service data was available to the templates. I assume these also work from the API and fromdocker stack deploy
.So my general problem. Lets say I have a service on 2 networks. It has its own clustering support built in and I need to advertise one of my 2 networks to other nodes in the cluster. I can't leave it to the service to choose, and the service can't handle DNS for this.
What i'd like to do is something like this:
I think this could be very useful for many clustering services. E.g. elasticsearch has
network.publish_host
.Right now I think I can work around this with shell foo (e.g. dig before execing underlying service) or by manually configuring ip addresses. I think it would be much cleaner (frankly both work arounds I am about to try are grim) to be able to do it with service templates.
The text was updated successfully, but these errors were encountered: