# docker compose port

**Description:** Print the public port for a port binding

**Usage:** `docker compose port [OPTIONS] SERVICE PRIVATE_PORT`










## Description

Prints the public port for a port binding


## Options

| Option | Default | Description |
|--------|---------|-------------|
| `--index` |  |  Index of the container if service has multiple replicas |
| `--protocol` | `tcp` |  tcp or udp |






