2014-04-16 12:07:55 -06:00
|
|
|
% DOCKER(1) Docker User Manuals
|
2014-07-01 12:58:04 +10:00
|
|
|
% Docker Community
|
|
|
|
% JUNE 2014
|
2014-04-16 12:07:55 -06:00
|
|
|
# NAME
|
2014-06-24 12:03:08 +10: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 12:07:55 -06:00
|
|
|
|
|
|
|
# SYNOPSIS
|
2014-06-24 12:03:08 +10:00
|
|
|
**docker port** CONTAINER [PRIVATE_PORT[/PROTO]]
|
2014-04-16 12:07:55 -06:00
|
|
|
|
2014-06-24 12:03:08 +10:00
|
|
|
# DESCRIPTION
|
|
|
|
List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
|
|
|
|
|
|
|
|
# EXAMPLES
|
|
|
|
You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
|
|
|
|
ask for just a specific mapping:
|
|
|
|
|
|
|
|
$ docker ps test
|
|
|
|
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
|
|
|
|
$ docker port test
|
|
|
|
7890/tcp -> 0.0.0.0:4321
|
|
|
|
9876/tcp -> 0.0.0.0:1234
|
|
|
|
$ docker port test 7890/tcp
|
|
|
|
0.0.0.0:4321
|
|
|
|
$ docker port test 7890/udp
|
|
|
|
2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
|
|
|
|
$ docker port test 7890
|
|
|
|
0.0.0.0:4321
|
2014-04-16 12:07:55 -06:00
|
|
|
|
|
|
|
# HISTORY
|
|
|
|
April 2014, Originally compiled by William Henry (whenry at redhat dot com)
|
2014-07-01 12:58:04 +10:00
|
|
|
June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
|