| title | container-compose port |
|---|---|
| description | Print the public port for a service's private port. |
Print the public port for a service's private port.
container-compose port [global-options] [options] service privatePort| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
--protocol |
string | tcp |
Port protocol (tcp or udp) | |
--file |
-f |
path | The path to your Docker Compose file |
| Argument | Description |
|---|---|
service |
Service name |
privatePort |
Private container port |
Find out which host port is mapped to the web service's port 80.
container-compose port web 80Find the host mapping for a UDP port.
container-compose port dns 53 --protocol udp