What does `EXPOSE` actually do?

IntermediateConceptDocker
Answer

Nothing at the network level. It's documentation and metadata. You still need -p 8080:80 to publish, or -P to publish exposed ports to random host ports.

All Real-World Interview questions Roadmap: Interview readiness

More on Docker