Docker Lab (4/12): EXPOSE, Port Mapping and the -P Flag (Part 2)

Giovanni Pace

Description

Part two on why EXPOSE isn't enough to publish a port: in the lab we use a Tomcat web server that stays running, look at docker port, and use the -P flag, which maps every exposed port to a random host port.