docker查看容器占用的端口

[root@yang ~]# docker ps
CONTAINER ID   IMAGE                           COMMAND                  CREATED       STATUS       PORTS     NAMES
a21ef3e7dfce   apache/apisix:2.8-alpine        "sh -c '/usr/bin/api…"   7 hours ago   Up 7 hours             apisix
e453c3731527   bitnami/etcd:latest             "/opt/bitnami/script…"   7 hours ago   Up 7 hours             etcd
8810009148c6   apache/apisix-dashboard:2.7.1   "/usr/local/apisix-d…"   7 hours ago   Up 7 hours             apisix-dashboard
f30ef340342d   mysql:5.7.34                    "docker-entrypoint.s…"   2 weeks ago   Up 2 weeks             mysql5.7
[root@yang ~]# docker inspect 8 | grep tcp
                "9000/tcp": {}
[root@yang ~]# docker inspect f | grep tcp
                "3306/tcp": {},
                "33060/tcp": {}


posted @ 2021-08-28 22:12  1769987233  阅读(4110)  评论(0编辑  收藏  举报