github.com/stchris/docker@v1.4.2-0.20150106053530-1510a324dbd5/docs/man/docker-port.1.md (about)

     1  % DOCKER(1) Docker User Manuals
     2  % Docker Community
     3  % JUNE 2014
     4  # NAME
     5  docker-port - List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
     6  
     7  # SYNOPSIS
     8  **docker port**
     9  CONTAINER [PRIVATE_PORT[/PROTO]]
    10  
    11  # DESCRIPTION
    12  List port mappings for the CONTAINER, or lookup the public-facing port that is NAT-ed to the PRIVATE_PORT
    13  
    14  # OPTIONS
    15  There are no available options.
    16  
    17  # EXAMPLES
    18  You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
    19  ask for just a specific mapping:
    20  
    21      $ docker ps test
    22      CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                            NAMES
    23      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
    24      $ docker port test
    25      7890/tcp -> 0.0.0.0:4321
    26      9876/tcp -> 0.0.0.0:1234
    27      $ docker port test 7890/tcp
    28      0.0.0.0:4321
    29      $ docker port test 7890/udp
    30      2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
    31      $ docker port test 7890
    32      0.0.0.0:4321
    33  
    34  # HISTORY
    35  April 2014, Originally compiled by William Henry (whenry at redhat dot com)
    36  June 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>
    37  November 2014, updated by Sven Dowideit <SvenDowideit@home.org.au>