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
This is my first post on GitHub. I hope I've provided enough information, and that my issue is clearly articulated.
I'm working on a Docker rootless project and facing an issue with accessing a service from both another container and my host using the same IP and port. While I've managed to access it using my host's global (LAN) IP address, this isn't very convenient.
I'd prefer to access it through a local IP address.
172.17.0.1:8080 (the default bridge network for Docker)
127.0.0.1:8080
192.168.25.54:8080 (my computer's IP)
And from the 'cmdline' container in the same network, I can access it using:
172.27.0.101
192.168.25.54:8080 (my computer's IP)
What I want is to access it through an address such as 172.17.0.1:8080 or 172.23.0.1:8080.
Is this possible? If so, how can it be achieved? Alternatively, are there any tricks to accomplish something similar?
Thank you for your help!
The text was updated successfully, but these errors were encountered:
y7a8c9
changed the title
Access a service from the same ip:port in both a container and the host/lan in docker rootless
Access a service from the same ip:port in both a container and the host/lan (docker rootless)
Dec 20, 2023
172.17.0.1:8080 (the default bridge network for Docker)
In the case of Rootless Docker, this is not really accessible from the host.
But if you have a bridge for Rootful Docker, and let Rootless Docker bind on 0.0.0.0, the port is bound to the bridge's IP as well.
What I want is to access it through an address such as 172.17.0.1:8080 or 172.23.0.1:8080.
So, you can't use 172.17.0.1.
172.27.0.101 is the right IP to use.
Not sure what is 172.23.0.1.
Hello,
This is my first post on GitHub. I hope I've provided enough information, and that my issue is clearly articulated.
I'm working on a Docker rootless project and facing an issue with accessing a service from both another container and my host using the same IP and port. While I've managed to access it using my host's global (LAN) IP address, this isn't very convenient.
I'd prefer to access it through a local IP address.
Here's an example of my setup:
From my host, I can access the service using:
And from the 'cmdline' container in the same network, I can access it using:
What I want is to access it through an address such as 172.17.0.1:8080 or 172.23.0.1:8080.
Is this possible? If so, how can it be achieved? Alternatively, are there any tricks to accomplish something similar?
Thank you for your help!
The text was updated successfully, but these errors were encountered: