In the manual there is such code:
dev@ubuntu:~$ docker run -d -p 5050:5000 training/webapp python app.py Quote description:
With this command, docker automatically finds the image of training / webapp in the official repository, downloads it and all the necessary layers, starts the container and the app.py application as a daemon (-d). All this looks to the external world through port 5050 and to the internal world (for communicating containers with each other) through port 5000 (-p 5050: 5000).
So after the launch of the container, you can open the browser, there is localhost:5050 and it will output 'Hello World!'. It's clear. This is a call to the external port of the container. And what is the internal port 5000? What does it mean to communicate containers with each other? If, for example, to launch the 2nd container, for example with a browser, will it be necessary to write localhost:5000 for output in this browser from the container of our 'Hello World'? I understand correctly? But if so, why not to 5050? After all, in fact, another container for the 1st is also an external application, just like the browser from the host system?