docker container port accessed from another container
问题 I have a container1 running a service1 on port1 also I have a container2 running a service2 on port2 How can I access service2:port2 from service1:port1? I mention that the container are linked together. I ask if there is a way to do it without accessing the docker0 IP (where the port is visible) thanks 回答1: The preferred solution is to place both containers on the same network, use the build-in dns discovery to reach the other node by name, and you'll be able to access them by the container