docker中 tomcat容器中无法使用 ip、ping、ifconfig 命令 原因 docker 在安装 tomcat 容器时是安装的基础版本,没有 ip、ping、ifconfig 命令 解决方法 # 进入 tomcat 容器 docker exec -it tomcat /bin/bash # 逐条执行一下命令即可 apt update apt install -y iproute2 # ip命令 apt install -y iputils-ping # ping 命令 apt install -y net-tools # ifconfig 相关命令