1DOCKER(1)                          JUNE 2014                         DOCKER(1)
2
3
4

NAME

6       docker-port - List port mappings for the CONTAINER, or lookup the
7       public-facing port that is NAT-ed to the PRIVATE_PORT
8
9
10

SYNOPSIS

12       docker port [--help] CONTAINER [PRIVATE_PORT[/PROTO]]
13
14
15

DESCRIPTION

17       List port mappings for the CONTAINER, or lookup the public-facing port
18       that is NAT-ed to the PRIVATE_PORT
19
20
21

OPTIONS

23       --help
24         Print usage statement
25
26
27

EXAMPLES

29              # docker ps
30              CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                            NAMES
31              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
32
33
34

Find out all the ports mapped

36              # docker port test
37              7890/tcp -> 0.0.0.0:4321
38              9876/tcp -> 0.0.0.0:1234
39
40
41

Find out a specific mapping

43              # docker port test 7890/tcp
44              0.0.0.0:4321
45
46              # docker port test 7890
47              0.0.0.0:4321
48
49
50

An example showing error for non-existent mapping

52              # docker port test 7890/udp
53              2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
54
55
56
57

HISTORY

59       April 2014, Originally compiled by William Henry (whenry at redhat dot
60       com) June 2014, updated by Sven Dowideit ⟨SvenDowideit@home.org.au⟩
61       November 2014, updated by Sven Dowideit ⟨SvenDowideit@home.org.au⟩
62
63
64
65Docker Community              Docker User Manuals                    DOCKER(1)
Impressum