Docker CLI

docker port

Displays configured host bindings for a container or one of its internal ports. It does not test the application. The example requires the running local-only fixture in the port mapping lesson. Check the effective local daemon and record the binding before making any HTTP request; this output does not establish remote reachability.

Formal Syntax & Structure

docker syntaxdocker
docker port CONTAINER [PRIVATE_PORT[/PROTO]]

Parameters & Attributes

NameTypeDescription
CONTAINERstringContainer name or ID.
PRIVATE_PORT[/PROTO]stringInternal port and optional protocol, such as 8080/tcp.

Working Example

Example Snippetdocker
docker port bm-v05-ports 8080/tcp
Docker Reference