• redhat7.4 docker run启动容器报错container_linux.go:449


    问题现象:

    在redhat服务器上使用docker run启动容器时报错:docker: Error response from daemon: OCI runtime create failed: container_linux.go:449;container init caused "write /proc/self/attr/keycreate: permission denied"": unknown.

    问题原因:由于操作系统已启用SELinux,造成“/proc/self/attr/keycreate” 没有写入权限  使用命令:getenfor查看SELinux运行模式

    root@localhost ~]# getenforce
    #查询SELinux的运行模式
    Enforcing
    #当前的SELinux是强制模式
    [root@localhost ~]# sestatus
    SELinux status:              enabled
    SELinuxfs mount:             /selinux
    Current mode:                enforcing
    Mode from config file:       enforcing
    Policy version:              24
    Policy from config file:     targeted

    解决办法:

    1 永久方法 – 需要重启服务器

    修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。

    2 临时方法 – 设置系统参数

    使用命令setenforce 0

    附:
    setenforce 1      //设置SELinux 成为enforcing模式
    setenforce 0     //设置SELinux 成为permissive模式

  • 相关阅读:
    Mybatis-Plus select不列出全部字段
    git合并之 merge和rebase
    git
    springboot缓存开发
    关于Maven打包
    邮件发送模型及其Python应用实例
    Python 日志模块的定制
    python 解析 XML文件
    有限状态机FSM详解及其实现
    动态规划
  • 原文地址:https://www.cnblogs.com/jamyxu/p/12641453.html
Copyright © 2020-2023  润新知