I\'m experimenting with Dockerfiles, and I think I understand most of the logic. However, I don\'t see the difference between \"exposing\" and \"publishing\" a port in this
You expose ports using the EXPOSE keyword in the Dockerfile or the
--expose flag to docker run. Exposing ports is a way of documenting which
ports are used, but does not actually map or open any ports. Exposing ports
is optional.