2014-04-16 18:07:55 +00:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-07-01 02:58:04 +00:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 18:07:55 +00:00
|
|
|
# NAME
|
2014-06-24 02:03:08 +00:00
|
|
|
docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
2014-04-16 18:07:55 +00:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-11-28 04:21:55 +00:00
|
|
|
**docker port**
|
2014-10-15 21:14:12 +00:00
|
|
|
[**--help**]
|
2014-11-28 04:21:55 +00:00
|
|
|
CONTAINER [PRIVATE_PORT[/PROTO]]
|
2014-04-16 18:07:55 +00:00
|
|
|
|
2014-06-24 02:03:08 +00:00
|
|
|
# DESCRIPTION
|
|
|
|
List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
|
|
|
|
2014-11-28 04:21:55 +00:00
|
|
|
# OPTIONS
|
2014-10-15 21:14:12 +00:00
|
|
|
**--help**
|
|
|
|
Print usage statement
|
2014-11-28 04:21:55 +00:00
|
|
|
|
2014-06-24 02:03:08 +00:00
|
|
|
# EXAMPLES
|
|
|
|
|
2015-06-03 19:50:06 +00:00
|
|
|
# docker ps
|
2014-06-24 02:03:08 +00:00
|
|
|
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
|
2015-06-03 19:50:06 +00:00
|
|
|
|
|
|
|
## Find out all the ports mapped
|
|
|
|
|
|
|
|
# docker port test
|
2014-06-24 02:03:08 +00:00
|
|
|
7890/tcp -> 0.0.0.0:4321
|
|
|
|
9876/tcp -> 0.0.0.0:1234
|
2015-06-03 19:50:06 +00:00
|
|
|
|
|
|
|
## Find out a specific mapping
|
|
|
|
|
|
|
|
# docker port test 7890/tcp
|
2014-06-24 02:03:08 +00:00
|
|
|
0.0.0.0:4321
|
2015-06-03 19:50:06 +00:00
|
|
|
|
|
|
|
# docker port test 7890
|
2014-06-24 02:03:08 +00:00
|
|
|
0.0.0.0:4321
|
2014-04-16 18:07:55 +00:00
|
|
|
|
2015-06-03 19:50:06 +00:00
|
|
|
## 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
|
|
|
|
|
2014-04-16 18:07:55 +00:00
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-01 02:58:04 +00:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|
2014-11-28 04:21:55 +00:00
|
|
|
November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|