Scroll to navigation

DOCKER-COMPOSE-PORT(1) DOCKER-COMPOSE-PORT(1)

NAME

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

SYNOPSIS

docker compose port [OPTIONS] SERVICE PRIVATE_PORT

DESCRIPTION

Prints the public port for a port binding

OPTIONS

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

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

--protocol="tcp" tcp or udp

OPTIONS INHERITED FROM PARENT COMMANDS

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

SEE ALSO

docker-compose(1)

Mar 2025