root@iZbp1g5xjla49rgz8pas3sZ:~# docker exec -it tomcat01 ip addr
OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown

1、这里需要先进入tomcat01容器内

docker exec -it tomcat01 /bin/bash

2、更新apt并安装ip组件

apt update && apt install -y iproute2

3、再按Ctrl+p+q退出当前容器,最后执行 以下命令即可完成

docker exec -it tomcat01 ip addr

 

 

Logo

权威|前沿|技术|干货|国内首个API全生命周期开发者社区

更多推荐