0a0dd116 |
% DOCKER(1) Docker User Manuals |
b07f1938 |
% Docker Community
% JUNE 2014 |
0a0dd116 |
# NAME |
4e340ced |
docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT |
0a0dd116 |
# SYNOPSIS |
e01baa6b |
**docker port** |
a2b529ea |
[**--help**] |
e01baa6b |
CONTAINER [PRIVATE_PORT[/PROTO]] |
0a0dd116 |
|
4e340ced |
# DESCRIPTION
List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
e01baa6b |
# OPTIONS |
a2b529ea |
**--help**
Print usage statement |
e01baa6b |
|
4e340ced |
# EXAMPLES
|
bf6492e6 |
# docker ps |
4e340ced |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
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 |
bf6492e6 |
## Find out all the ports mapped
# docker port test |
4e340ced |
7890/tcp -> 0.0.0.0:4321
9876/tcp -> 0.0.0.0:1234 |
bf6492e6 |
## Find out a specific mapping
# docker port test 7890/tcp |
4e340ced |
0.0.0.0:4321 |
bf6492e6 |
# docker port test 7890 |
4e340ced |
0.0.0.0:4321 |
0a0dd116 |
|
bf6492e6 |
## An example showing error for non-existent mapping
# docker port test 7890/udp
2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
|
0a0dd116 |
# HISTORY
April 2014, Originally compiled by William Henry (whenry at redhat dot com) |
b07f1938 |
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |
e01baa6b |
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au> |