docker升级后容器全部丢失apparmor错误修复

起因:

clouddrive突然只能读取挂载的阿里云盘列表,无法访问相关内容。经查询发现2023.02.13阿里云盘的API升级了

遂尝试升级clouddrive2尝试是否可用,但clouddrive2挂载需要fuse 3,而debian10默认的版本是fuse 2.9.9

然后就单独安装了 apt install fuse3 ,顺便升级了一下docker版本,结果所有容器重启后都未启动

只有clouddrive2在启动。。。

OS:debian 10

Docker版本:Version: 23.0

docker ps

查不到任何容器

docker container ls -a

可以查到已部署的容器

单独启动

docker container start portainer

提示:Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: unable to apply apparmor profile: apparmor failed to apply profile: write /proc/self/attr/apparmor/exec: no such file or directory: unknown
Error: failed to start containers: portainer

根据错误查到是容器进程无法应用 apparmor 配置文件

解决思路

apt update
apt upgrade
apt install apparmor
sudo systemctl enable apparmor
sudo systemctl start apparmor
systemctl restart docker.service

之后正常

参考:

docker 无法安装portainer以及FAST面板-服务器-CSDN问答

docker - Can't apply AppArmor profile on container: "no such file or directory" - Stack Overflow

apparmor failed to apply profile: write /proc/self/attr/exec: invalid argument: unknown. · Issue #1199 · docker/for-linux · GitHub

How To Install fuse3 on Debian 10 | Installati.one

docker详细版本:

Client: Docker Engine - Community
Version: 23.0.1
API version: 1.42
Go version: go1.19.5
Git commit: a5ee5b1
Built: Thu Feb 9 19:46:49 2023
OS/Arch: linux/amd64
Context: default

Server: Docker Engine - Community
Engine:
Version: 23.0.1
API version: 1.42 (minimum version 1.12)
Go version: go1.19.5
Git commit: bc3805a
Built: Thu Feb 9 19:46:49 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.16
GitCommit: 31aa4358a36870b21a992d3ad2bef29e1d693bec
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0

版权声明:
作者:Jays
链接:https://ijays.com/2023/02/docker-update-fix-apparmor.html
来源:颓废的美
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>