github.com/nf/docker@v1.8.1/docs/reference/commandline/port.md (about)

     1  <!--[metadata]>
     2  +++
     3  title = "port"
     4  description = "The port command description and usage"
     5  keywords = ["port, mapping, container"]
     6  [menu.main]
     7  parent = "smn_cli"
     8  weight=1
     9  +++
    10  <![end-metadata]-->
    11  
    12  # port
    13  
    14      Usage: docker port CONTAINER [PRIVATE_PORT[/PROTO]]
    15  
    16      List port mappings for the CONTAINER, or lookup the public-facing port that is
    17  	NAT-ed to the PRIVATE_PORT
    18  
    19  You can find out all the ports mapped by not specifying a `PRIVATE_PORT`, or
    20  just a specific mapping:
    21  
    22      $ docker ps test
    23      CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS                                            NAMES
    24      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
    25      $ docker port test
    26      7890/tcp -> 0.0.0.0:4321
    27      9876/tcp -> 0.0.0.0:1234
    28      $ docker port test 7890/tcp
    29      0.0.0.0:4321
    30      $ docker port test 7890/udp
    31      2014/06/24 11:53:36 Error: No public port '7890/udp' published for test
    32      $ docker port test 7890
    33      0.0.0.0:4321