compose/docs/reference/compose_port.md
Nicolas De Loof b0af2deb2b when --index is not set select first service container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2023-07-07 14:08:24 +02:00

19 lines
668 B
Markdown

# docker compose port
<!---MARKER_GEN_START-->
Print the public port for a port binding.
### Options
| Name | Type | Default | Description |
|:-------------|:---------|:--------|:--------------------------------------------------------|
| `--dry-run` | | | Execute command in dry run mode |
| `--index` | `int` | `0` | index of the container if service has multiple replicas |
| `--protocol` | `string` | `tcp` | tcp or udp |
<!---MARKER_GEN_END-->
## Description
Prints the public port for a port binding.