EXPOSE 8080 9090 3000-3005
EXPOSE 3000 # This does NOT publish the port! dockerfile expose example
To actually reach your application from a browser, you must "publish" the port during the docker run command, regardless of whether EXPOSE is in the Dockerfile. Command/Flag Where it Lives Declares intent; "This app listens on 8000". Dockerfile -p 80:8000 Actually maps host port 80 to container port 8000. docker run command -P Auto-maps all EXPOSE ports to random host ports. docker run command Fun Fact: You Don't Technically Need It What is the use of EXPOSE in Docker file - General EXPOSE 8080 9090 3000-3005 EXPOSE 3000 # This
# Specify UDP EXPOSE 53/udp