The EXPOSE instruction is often one of the most misunderstood parts of a Dockerfile. While it sounds like it opens a "window" to the outside world, it is actually more like a "Post-it note" stuck to the image. The Core Concept: Documentation, Not Action
FROM nginx:latest
If your app uses UDP (like a DNS server or a game server), specify it: EXPOSE 53/udp . dockerfile expose example
# Use TCP (default) EXPOSE 80
# This tells the operator that this container # listens on port 80 inside the container. EXPOSE 80 The EXPOSE instruction is often one of the