github.com/pwn-term/docker@v0.0.0-20210616085119-6e977cce2565/cli/man/src/container/port.md (about) 1 List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT 2 3 # EXAMPLES 4 5 $ docker ps 6 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7 b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234->9876/tcp, 0.0.0.0:4321->7890/tcp test 8 9 ## Find out all the ports mapped 10 11 $ docker container port test 12 7890/tcp -> 0.0.0.0:4321 13 9876/tcp -> 0.0.0.0:1234 14 15 ## Find out a specific mapping 16 17 $ docker container port test 7890/tcp 18 0.0.0.0:4321 19 20 $ docker container port test 7890 21 0.0.0.0:4321 22 23 ## An example showing error for non-existent mapping 24 25 $ docker container port test 7890/udp 26 2014/06/24 11:53:36 Error: No public port '7890/udp' published for test