Docker 容器启动报错的解决方法

环境:
  • Docker : 20.10.7
  • 系统:centos 7.9.2009
  • Docker安装方式:rpm包安装
错误信息

Docker服务没有任何问题,但是当容器启动时报如下错误:

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/40b48d6f9ea6c0bbcbaa9413adb1914b41e4750465125742203b5d2cb72d3c06/log.json: no such file or directory): runc did not terminate successfully: unknown.
ERRO[0000] error waiting for container: context canceled

仔细看上边的报错,有一句runc did not terminate successfully: unknown.,猜测是runc导致的
运行runc:

$ runc
runc: error while loading shared libraries: libseccomp.so.2: cannot open shared object
file: No such file or directory
问题解决

通过上边执行runc命令发现少libseccomp.so.2动态库。应该是系统没安装libseccomp库。
安装libseccomp-2.3.1-4.el7.x86_64.rpm (直接搜索可以找到下载地址)

$ rpm -ivh libseccomp-2.3.1-4.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:libseccomp-2.3.1-4.el7           ################################# [100%]

再次启动容器成功!

评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Cloud-Future

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值