-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[BUG] Internal DNS resolution is not working as expected #12100
Comments
Can you please provide a sample compose.yaml file to demonstrate this issue ? |
In this case I have two separate compose.yaml files: Container A:
Container B:
(Tried also to remove the "ports" from container_b, but same behavior) Thanks |
Hello, little update here. If i run the I tried also a simpler example:
The same issue is present if I try to curl |
I tried to reproduce with this compose file: services:
container_a:
image: nginx
container_name: container_a
ports:
- 127.0.0.1:15000:8849 # I use this for testing purpose with ssh tunnels
networks:
- internal_net
container_b:
image: nginx
container_name: container_b
ports:
- 127.0.0.1:17480:17480 # I use this for testing purpose with ssh tunnels
- 127.0.0.1:17481:17481 # I use this for testing purpose with ssh tunnels
networks:
- internal_net
- container_b_net
networks:
internal_net:
name: internal_net
driver: bridge
internal: true
container_b_net:
name: container_b_net
driver: bridge And can't reproduce
|
@mircoianese could you try with the latest release? |
Closing as can't reproduce and user didn't provided feedback. |
Description
I have two containers:
Container A:
- Connected to Bridge network
reverse_proxy_net
- Connected to Bridge Internal network
internal_net
Container B:
- Connected to Bridge network
container_b_net
(for internet access)- Connected to Bridge Internal network
internal_net
(needs to communicate with Container A)internal_net
inspect (simplified):container_b_net
inspect (simplified):With this configuration
Container A
is correctly able to resolveContainer B
IP, but the opposite is not true.From
Container B
thenslookup container_a
command resolves to itself, returning172.25.0.2
:If I remove the
container_b_net
from the docker compose file, resolution works, but I lose internet access (sinceinternal_net
is marked asinternal
).If I try to curl directly using the
container_a
IP fromcontainer_b
it works, so it's some sort of issue on DNS resolution.If i try to curl using the
container_a
name fromcontainer_b
it resolves the same as nslookup does. If i manually specify the internal network interface, the connection times out.I'm running out of ideas and this seems a bug to me at this point.
Thank you for your time
Steps To Reproduce
Compose Version
Docker Environment
Anything else?
No response
The text was updated successfully, but these errors were encountered: