exec failed: unable to start container process: exec: “ip“: executable file not found in $PATH

当遇到OCI运行时错误,表示无法在容器中找到ip或ping可执行文件时,原因是容器镜像是精简版,缺少必要的工具。通过dockerexec进入容器,更新apt源,然后安装iproute2以支持ip命令,对于ping命令的缺失,同样需要安装iputils-ping。安装完成后,问题应得到解决。

问题报错:

OCI runtime exec failed: exec failed: unable to start container process: exec: "ip": executable file not found in $PATH: unknown

报错原因:因为该容器的镜像时精简版,内部缺少iproute2导致无法使用ip命令

解决方式:

进入容器

docker exec -it 容器名 /bin/bash

进入后:

更新apt

apt-get update

安装iproute2

agt install -y iproute2

安装完以后退出exit

docker exec -it 容器名 ip addr

 修改后尝试结果:

同理

OCI runtime exec failed: exec failed: unable to start container process: exec: "ping": executable file not found in $PATH: unknown

 安装iputils-ping

agt install -y iputils-ping

评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值