-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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_mode: "service:[service name]" not adequately documented. #9725
Comments
I'm currently using Useful for service mesh proxy handing with apps running in containers. Outside of that, I haven't used it otherwise. |
I'm also looking for some documentation on the details of how this feature works. I'm seeing it used in other placements, but I really don't understand the implications of this setting 🤷🏾♂️ |
It's pretty vague, but I believe (by reading both the Docker CLI and COMPOSE specification documentation) it is down to docker-compose implementing Docker CLI references containers directly (by name or id), whereas docker-compose uses services (which as far as I know, under the hood will be translated into containers).
And the COMPOSE specification states:
I read this as if it implements this on top of the Docker CLI --network options. The |
Referencing a service by name does not appear to work, and seems to actually be a one-time translation to container ID. Truncated compose file, starts up no problem.
However, should the wireguard container be recreated, the reference no longer functions, apparently because docker uses an ID, rather than a name, under the hood.
Anyone else having this same issue? |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
/remove-lifecycle stale |
There hasn't been any activity on this issue for a long time. Prevent issues from auto-closing with a /lifecycle stale |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This definitely needs more documentation! I've been testing and implementing connection between two containers which use VPN-services, and I'm trying to find any equivalent configuration with either "networks" that can resemble the :service[name] parameter. From what I can do in ..using
I'm using The inspect on the container using the
however under |
This forum post provides more details. Link |
have you ever found a solution? |
@ the docs it reads
Network mode. Use the same values as the docker client --network parameter, plus the special form service:[service name].
But I can't find anything that clearly states what it's supposed to do, just guesses and vague answers.
Same as #5325
But someone closed it and said "feel free to reopen it" but ignored when people asked to reopen.
The text was updated successfully, but these errors were encountered: