github.com/khulnasoft/cli@v0.0.0-20240402070845-01bcad7beefa/docs/reference/commandline/container_port.md (about) 1 # port 2 3 <!---MARKER_GEN_START--> 4 List port mappings or a specific mapping for the container 5 6 ### Aliases 7 8 `docker container port`, `docker port` 9 10 11 <!---MARKER_GEN_END--> 12 13 ## Examples 14 15 ### Show all mapped ports 16 17 You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or 18 just a specific mapping: 19 20 ```console 21 $ docker ps 22 23 CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 24 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 25 26 $ docker port test 27 28 7890/tcp -> 0.0.0.0:4321 29 9876/tcp -> 0.0.0.0:1234 30 31 $ docker port test 7890/tcp 32 33 0.0.0.0:4321 34 35 $ docker port test 7890/udp 36 37 2014/06/24 11:53:36 Error: No public port '7890/udp' published for test 38 39 $ docker port test 7890 40 41 0.0.0.0:4321 42 ```