gpt4 book ai didi

docker - Docker容器由于apparmor而无法启动,为什么?

转载 作者:行者123 更新时间:2023-12-02 19:49:45 45 4
gpt4 key购买 nike

我重新安装了Ubuntu 18.04。安装的唯一程序是docker。

但是,如果我尝试运行hello-world容器以测试安装,则运行失败:

docker: Error response from daemon: AppArmor enabled on system but the docker-default profile could not be loaded: running `/sbin/apparmor_parser apparmor_parser -Kr /var/lib/docker/tmp/docker-default847992402` failed with output: apparmor_parser: Unable to replace "docker-default".  Permission denied; attempted to load a profile while confined?

error: exit status 243.
ERRO[0000] error waiting for container: context canceled

系统上没有安装apparmor配置文件:
apparmor module is loaded.
0 profiles are loaded.
0 profiles are in enforce mode.
0 profiles are in complain mode.
0 processes have profiles defined.
0 processes are in enforce mode.
0 processes are in complain mode.
0 processes are unconfined but have a profile defined.

如何安装配置文件?并修复错误?

我正在尝试运行:
sudo docker run hello-world 

我通过以下方式安装了docker:
sudo apt install docker.io

系统是LXC虚拟服务器上的Ubuntu 18.04

乔纳斯

最佳答案

要在LXD服务器上正确运行docker,请在LXC配置中的vServer外部进行一些更改。就我而言,我必须在托管人的仪表板上启用Docker支持。

关于docker - Docker容器由于apparmor而无法启动,为什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61668046/

45 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com