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