github.com/yogeshlonkar/moby@v1.13.2-0.20201203103638-c0b64beaea94/docs/reference/commandline/port.md (about) 1 --- 2 title: "port" 3 description: "The port command description and usage" 4 keywords: "port, mapping, container" 5 --- 6 7 <!-- This file is maintained within the docker/docker Github 8 repository at https://github.com/docker/docker/. Make all 9 pull requests against that repo. If you see this file in 10 another repository, consider it read-only there, as it will 11 periodically be overwritten by the definitive file. Pull 12 requests which include edits to this file in other repositories 13 will be rejected. 14 --> 15 16 # port 17 18 ```markdown 19 Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]] 20 21 List port mappings or a specific mapping for the container 22 23 Options: 24 --help Print usage 25 ``` 26 27 ## Examples 28 29 ### Show all mapped ports 30 31 You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or 32 just a specific mapping: 33 34 ```bash 35 $ docker ps 36 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 37 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 38 $ docker port test 39 7890/tcp -> 0.0.0.0:4321 40 9876/tcp -> 0.0.0.0:1234 41 $ docker port test 7890/tcp 42 0.0.0.0:4321 43 $ docker port test 7890/udp 44 2014/06/24 11:53:36 Error: No public port '7890/udp' published for test 45 $ docker port test 7890 46 0.0.0.0:4321 47 ```