Ping Docker container from another computer on the network

I created a docker container and tried pinging www.google.com in the container bash and it works. Also I tried to ping the container from the host - it works fine.

But when I try to ping a container from an external system on the network, it gives me an exception with a request.

I plan to install the tomcat web server on a container and allow other containers to access the application deployed on the server. Thank you for your help!

+4
source share
1 answer

Docker ( , Docker -docker0- IP-, Docker ).

, Docker, "" ( Docker) . / , .

, Tomcat (, 8080) 80 , , -p:

    docker run -d -p 80:8080 my-tomcat-image:tag 

Tomcat , .

+4

Source: https://habr.com/ru/post/1544041/


All Articles