在阿里云利用docker获取ip地址出错
root@iZbp1g5xjla49rgz8pas3sZ:~# docker exec -it tomcat01 ip addrOCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found i
·
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
更多推荐
已为社区贡献1条内容
所有评论(0)