Docker 启动容器遇到 operation not permitted 错误的解决

问题

在 Linux 启动容器报错 operation not permitted ,容器运行失败
(但在 Mac 上运行正常,注 Mac 上的 Docker 版本不同于 Linux)

报错示例:

$ docker run --rm -it quay.io/debezium/connect:2.1 
...  ...
realpath: /kafka/bin/..: operation not permitted  <==== 报错
... ...

原因

与 Linux 的权限安全保护相关

https://bugzilla.redhat.com/show_bug.cgi?id=1764152
https://blog.twtnn.com/2021/09/docker-containeroperation-not-permitted.html
...Linux為了讓 Docker 更加安全,所以限制了 container 部份的權限,就算是以 root 身份來執行,該限制依舊是有效的。...

https://github.com/zendesk/maxwell/issues/1819
...maybe upgrading docker will help
或许更新 Docker 有所帮助...

https://forums.oracle.com/ords/apexds/post/docker-image-oraclelinux-8-ls-shows-operation-not-permitted-5882
This was resolved by upgrading docker to the latest version on OL7
该问题通过将 Docker 升级到最新版即可解决...

解决

更新 containerd 版本

$ yum install containerd.io

猜你喜欢

转载自blog.csdn.net/xchenhao/article/details/130299362