登录 立即注册

首页 > 绿虎论坛 > 电脑 > Linux/Unix > ARM (发帖)

标题: 你们的随身wifi安装Docker应用有没有报错?

作者: @Ta

时间: 2023-03-19

点击: 13618

有些应用就会报错,无法安装,有些没事,安装的是ddns-go,命令:

docker run -d --name ddns-go --restart=always --net=host -v /opt/ddns-go:/root jeessy/ddns-go


以下报错信息,docker: 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.

[隐藏样式|查看源码]


『回复列表(8|隐藏机器人聊天)』

1. image.png(86.93 KB)
(/@Ta/2023-03-20 11:35//)

2.

@ChatGPT,docker: 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.

(/@Ta/2023-03-20 15:03//)

3.

@旧人,这个错误提示通常是由于 AppArmor(一个安全增强工具)的配置问题导致的,AppArmor可能会阻止 Docker 运行容器进程。以下是一些可能的解决方法:

  1. 重新安装 Docker
    有时候 Docker 安装过程中某些文件出现了问题,导致 AppArmor 配置不正确,可以尝试重新安装 Docker。

  2. 检查 AppArmor 的配置
    可以检查 AppArmor 的配置文件是否正确,如果文件有误或缺失,则需要手动修复或重新安装 AppArmor。

  3. 更新 Docker 版本
    可以尝试更新 Docker 版本,以获得更好的兼容性和性能。

  4. 关闭 AppArmor
    可以暂时关闭 AppArmor 来解决问题,但这并不是一个长期的解决方案,因为关闭 AppArmor 可能会降低系统的安全性。要关闭 AppArmor,可以使用以下命令:

sudo service apparmor stop
sudo update-rc.d -f apparmor remove

注意:在执行上述操作之前,应该了解 AppArmor 对系统的安全性所带来的影响,并确保在操作后及时重新启用 AppArmor。

(/@Ta/2023-03-20 15:03//)

4. 无法使用这个命令Screenshot_2023-03-21-06-02-29-769_com.sonelli.juicessh.jpg(347.52 KB)
(/@Ta/2023-03-21 06:04//)

5. 去掉sudo运行后还是报错
root@yebeiwifi:~# service apparmor stop
Failed to stop apparmor.service: Unit apparmor.service not loaded.
root@yebeiwifi:~# update-rc.d -f apparmor remove
root@yebeiwifi:~# docker run -d --name ddns-go --restart=always --net=host -v /ddns-go:/root jeessy/ddns-go /bin/sh
Unable to find image 'jeessy/ddns-go:latest' locally
latest: Pulling from jeessy/ddns-go
9b3977197b4f: Pull complete
221752ba9a3c: Retrying in 12 seconds
a9c40c9b828d: Retrying in 1 second
92b3577542de: Retrying in 1 second
latest: Pulling from jeessy/ddns-go
af6eaf76a39c: Pull complete
f8a75cc1ba2e: Pull complete
728bfada2881: Pull complete
4140bb0859ec: Pull complete
fb6292562984: Pull complete
Digest: sha256:daff5927b7ca4fd4a0f65ca992d29222b4da944ccdabcf4d25f486f16411efde
Status: Downloaded newer image for jeessy/ddns-go:latest
58a2798974bbd286d388b5b26baf70f785dfcfc3f6b03f51a09d884a38423626
docker: 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.
(/@Ta/2023-03-21 08:18//)

6. @ChatGPT,docker: 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.
(/@Ta/2023-03-21 08:18//)

7.

[新会话] @hui214,This error message typically indicates an issue with Docker's runtime environment. Specifically, it suggests that there is a problem with the AppArmor security profiles that Docker uses to isolate containers from the host system.

To fix this issue, you can try the following steps:

  1. Check that the AppArmor service is running on your system:

    sudo systemctl status apparmor.service
    

    If the service is not running, you can start it with the following command:

    sudo systemctl start apparmor.service
    
  2. Make sure that the AppArmor profile for Docker exists:

    sudo apparmor_parser -R /etc/apparmor.d/docker
    

    This command should return without any errors.

  3. Restart the Docker service:

    sudo systemctl restart docker.service
    

    After restarting Docker, try running your container again and see if the error has been resolved.

If the above steps do not solve the problem, you may need to investigate further to identify the root cause of the issue. Some potential causes include conflicts with other security software, incorrect permissions on Docker-related files or directories, or configuration issues with Docker itself.

(/@Ta/2023-03-21 08:19//)

8. 还是不起作用,估计只能重新刷了
(/@Ta/2023-03-21 20:10//)

回复需要登录

11月23日 03:26 星期六

本站由hu60wap6华为CPU驱动

备案号: 京ICP备18041936号-1