docker compose port

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

OptionShortDefaultDescription
--indexindex of the container if service has multiple replicas
--protocoltcptcp or udp