-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
links not work for network_mode: "bridge" #9053
Comments
Hello, |
I have this same issue, works fine with |
I have the almost same issue where I am using "depends_on" instead of links and the containers are not able to see each other when I use docker compose. So, I am forced to revert to docker-compose v1 |
The documentation here: https://docs.docker.com/network/bridge/ says the containers should be able to see each other using links but links is legacy. |
Hiya @wangliangliang2 (and everyone else facing the same issue): I believe this commit should address this issue. Please check again when the next version is released to see if the issue is resolved! |
@laurazard Thank you for this! <3 Also, I would like to throw out one observation that the My PR is: goalgorilla/drupal_social#374 For example: Considering the following in compose.yaml, container1 will be able to access container2 using "name", but this works on Docker for Mac but not on Ubuntu using Docker CE.
|
I'm going to close this issue since the original problem has been fixed/shipped. @navneet0693 feel free to open another issue for the problem you're dealing with. |
the following yaml will automatic create new network, then nginx2 can ping nginx1.
but I don't want it to create new network , so I use the following yaml. it turns out that nginx2 can't ping nginx1.
it shows me: ping: bad address 'nginx1'.
but when you use the following code , nginx1 and nginx2 will add to default bridge network and nginx2 can ping nginx1.
docker inspect nginx2 will show then the follwing code.
so, is there a way to fix this problem when docker-compose use default bridge can't link other service?
The text was updated successfully, but these errors were encountered: