Docker容器启动时报错:container init caused “write /proc/self/attr/keycreate: permission denied““: unknown

1 问题描述

1.1 报错完整信息
docker: Error response from daemon: OCI runtime create failed: container_linux.go:449;container init caused "write /proc/self/attr/keycreate: permission denied"": unknown.
1.2 报错背景
  • linux环境下使用离线方式(tgz安装包形式)安装docker
  • 使用了docker load < xx.tar导入镜像
  • 输入docker imagesdocker ps -a显示该镜像已正常导入,且已经通过docker run生成了容器

2 解决措施

如背景以及报错信息与问题描写基本一致,可以考虑如下解决方法

2.1 永久更改

需要重启服务器,慎重选用:

  1. 编辑config文件:vi /etc/selinux/config
  2. SELINUX=enforcing改为SELINUX=disabled
  3. 重启服务器
  4. 启动docker容器docker start container-id
2.2 临时更改
  1. 输入setenforce 0
  2. 启动docker容器docker start container-id

方法参考链接: 参考博客链接
  • 14
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 11
    评论
在连接Docker守护进程套接字时出现了权限被拒绝的错误。这个错误表示当前用户没有足够的权限来连接到Docker守护进程的套接字。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [报错:Got permission denied while trying to connect to the Docker daemon socket at unix:///var/](https://blog.csdn.net/wss794/article/details/128036026)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *2* [Docker”Got permission denied while trying to connect to the Docker daemon socket”报错解决](https://download.csdn.net/download/weixin_38714370/14042035)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] - *3* [Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.](https://blog.csdn.net/ren365880/article/details/124202924)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 33.333333333333336%"] [ .reference_list ]
评论 11
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值