©
이 문서에서는 PHP 중국어 웹사이트 매뉴얼 풀어 주다
列出容器的端口映射或特定映射
docker port CONTAINER [PRIVATE_PORT[/PROTO]]
命令 | 描述 |
---|---|
docker | Docker CLI的基本命令。 |
你可以找出所有映射的端口没有指定PRIVATE_PORT
,或只是一个特定的映射:
$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES b650456536c7 busybox:latest top 54 minutes ago Up 54 minutes 0.0.0.0:1234->9876/tcp, 0.0.0.0:4321->7890/tcp test $ docker port test7890/tcp -> 0.0.0.0:43219876/tcp -> 0.0.0.0:1234$ docker port test 7890/tcp0.0.0.0:4321$ docker port test 7890/udp2014/06/24 11:53:36 Error: No public port '7890/udp' published for test $ docker port test 78900.0.0.0:4321