查看容器ip时报错“OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "ip": executable file not found in $PATH: unknown”


 

 

问题:查看容器ip时执行命令

docker exec -it tomcat01 ip addr 报错

 

 

 

 

 

解决方案:

进入容器,执行  apt update && apt install -y iproute2命令

 

之后就可以正常执行了!

 

 

 

或者也可以执行

docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 容器名字/容器id

 

 

不过执行完这条命令后只显示ip,没有其他信息!

 

 

补充:有时候我们需要ping命令,发现镜像系统很精简,没有ping命令,这时候就需要手动安装了

进入容器内部执行:apt-get install inetutils-ping(执行此命令前还得先执行上一条)

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



猜您在找 OCI runtime create failed: container_linux.go:349: starting container process caused "exec: "bash": executable file not found in $PATH": unknown docker OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown docker - 进入容器报错:OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: exec: "/bin/bash": stat /bin/bash: no such file or directory: unknown OCI runtime create failed: container_linux.go:380: starting container process caused: exec: docker exec 无法进入容器 OCI runtime exec failed、container_linux.go:348: starting container process caused "process_linux.go:78: starting setns process caused \"fork/exec /proc/self/exe: no such file Docker OCI runtime exec failed: exec failed: container_linux.go:344: starting container process caus kolla部署openstack allinone,报错APIError: 500 Server Error: Internal Server Error (\"oci runtime error: container_linux.go:235: starting container process caused \"container init exited prematurely 【解决】OCI runtime exec failed......executable file not found in $PATH": unknown Error response from daemon: oci runtime error: container_linux.go:235: starting container process ………… centos7.2部署docker-17.06.0-ce的bug:Error response from daemon: oci runtime error: container_linux.go:262: starting container process caused "process_linux.go:339: container init caused \"\"".
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM