DOKK / manpages / debian 13 / docker-compose / docker-compose-port.1.en
DOCKER-COMPOSE-PORT(1) DOCKER-COMPOSE-PORT(1)

docker-compose-port - Print the public port for a port binding

docker compose port [OPTIONS] SERVICE PRIVATE_PORT

Prints the public port for a port binding

-h, --help[=false] help for port

--index=0 Index of the container if service has multiple replicas

--protocol="tcp" tcp or udp

--dry-run[=false] Execute command in dry run mode

docker-compose(1)

Mar 2025