You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and B as network_mode: service:A, then B does not appear to be in the network some_network: docker instpect B does not show some_network in the NetworkSettings.Networks field.
The attribute NetworkSettings.Networks of whoami2 contains the "web" network
docker inspect whoami
The attribute NetworkSettings.Networks of whoamiDOES NOT contains the "web" network. I believe it should.
I believe this issue is a direct consequence of this and this.
Some backstory
I use network_mode: service[net_holder] on service whoami because I need it to have its network traffic routed through the container of service net_holder.
I need whomai to be in the network web because I use traefik with the traefik.docker.network=web label. Since docker (and hence traefik too) does not see whoami is in the network web, traeffik emits an error:
"Could not find network named 'web' for container '/whoami'! Maybe you're missing the project's prefix in the label? Defaulting to first available network." container=whoami-stackname-xxxxxxxxxx serviceName=whoami providerName=docker
It works when net_holder is in only one network. But if net_holder is in X networks, B will have a probability of 1/X to be exposed to traefik according to the traefik documentation.
If you want to reproduce this bug behavior with traefik, please see this gist. It has two compose files: the one presented in this issue, and another one with traefik.
Anyway, thank you for your amazing work !
Let me know if you have any question.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Description of the issue
Hi,
Let say I have two services:
A
andB
.If
A
hasand
B
asnetwork_mode: service:A
, thenB
does not appear to be in the networksome_network
:docker instpect B
does not showsome_network
in theNetworkSettings.Networks
field.Context information (for bug reports)
Output of
docker-compose version
Output of
docker version
Output of
docker-compose config
Steps to reproduce the issue
docker-compose up
the stackdocker inspect whoami2
whoami2
contains the "web" networkdocker inspect whoami
whoami
DOES NOT contains the "web" network. I believe it should.I believe this issue is a direct consequence of this and this.
Some backstory
I use
network_mode: service[net_holder]
on servicewhoami
because I need it to have its network traffic routed through the container of servicenet_holder
.I need
whomai
to be in the networkweb
because I use traefik with thetraefik.docker.network=web
label. Since docker (and hence traefik too) does not seewhoami
is in the networkweb
, traeffik emits an error:It works when
net_holder
is in only one network. But if net_holder is in X networks, B will have a probability of 1/X to be exposed to traefik according to the traefik documentation.If you want to reproduce this bug behavior with traefik, please see this gist. It has two compose files: the one presented in this issue, and another one with traefik.
Anyway, thank you for your amazing work !
Let me know if you have any question.
The text was updated successfully, but these errors were encountered: