Show the published ports of a Docker container
docker show port mapping | which ports does docker container expose | docker port command | docker | ports | networkdocker port appLists the published ports in the format 80/tcp -> 0.0.0.0:8080. If it shows 0.0.0.0 or [::], the port is reachable on all interfaces, with 127.0.0.1 only locally, for example for a reverse proxy in front.
Note: Ports published by Docker often bypass ufw rules because Docker sets its own iptables rules. Therefore bind services behind a proxy to 127.0.0.1. Docker commands require root or the docker group.
Also searched as
- docker show port mapping
- which ports does docker container expose
- docker port command