github.com/vieux/docker@v0.6.3-0.20161004191708-e097c2a938c7/man/docker-port.1.md (about) 1 % DOCKER(1) Docker User Manuals 2 % Docker Community 3 % JUNE 2014 4 # NAME 5 docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT 6 7 # SYNOPSIS 8 **docker port** 9 [**--help**] 10 CONTAINER [PRIVATE_PORT[/PROTO]] 11 12 # DESCRIPTION 13 List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT 14 15 # OPTIONS 16 **--help** 17 Print usage statement 18 19 # EXAMPLES 20 21 # docker ps 22 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 23 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 24 25 ## Find out all the ports mapped 26 27 # docker port test 28 7890/tcp -> 0.0.0.0:4321 29 9876/tcp -> 0.0.0.0:1234 30 31 ## Find out a specific mapping 32 33 # docker port test 7890/tcp 34 0.0.0.0:4321 35 36 # docker port test 7890 37 0.0.0.0:4321 38 39 ## An example showing error for non-existent mapping 40 41 # docker port test 7890/udp 42 2014/06/24 11:53:36 Error: No public port '7890/udp' published for test 43 44 # HISTORY 45 April 2014, Originally compiled by William Henry (whenry at redhat dot com) 46 June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> 47 November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>