CmdID / docker / docker compose
docker compose port
List port mappings or print the public port for a specific mapping for the service Docker Compose reference
3 options Its page in the Docker Compose reference
Options
--dry-runExecute command in dry run mode--indexIndex of the container if service has multiple replicas--protocoltcp or udp