docker-compose 在创建的时候抛异常

docker-compose 在创建的时候抛出以下异常

INFO[2020-05-19T17:36:59.658945940+08:00] shim reaped                                   id=19544c36eb40661bae26d559d0061e9616addbde74c9dcee13978f8568b6e1fd
ERRO[2020-05-19T17:36:59.670228708+08:00] stream copy error: reading from a closed fifo 
ERRO[2020-05-19T17:36:59.670247348+08:00] stream copy error: reading from a closed fifo 
ERRO[2020-05-19T17:36:59.743560389+08:00] 19544c36eb40661bae26d559d0061e9616addbde74c9dcee13978f8568b6e1fd cleanup: failed to delete container from containerd: no such container 
ERROR: Service 'zookeeper' failed to build: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"write /proc/self/attr/keycreate: permission denied\"": unknown

解决办法:

即时解决不重启服务器的方式如下:

[root@bigdata2 var]# setenforce 0  

永久生效设置如下,编辑/etc/selinux/config 的配置文件:

# This file controls the state of SELinux on the system.  

# SELINUX= can take one of these three values:  

#     enforcing - SELinux security policy is enforced.  

#     permissive - SELinux prints warnings instead of enforcing.  

#     disabled - No SELinux policy is loaded.  

#SELINUX=enforcing  

SELINUX=disabled  

# SELINUXTYPE= can take one of three two values:  

#     targeted - Targeted processes are protected,  

#     minimum - Modification of targeted policy. Only selected processes are protected.   

#     mls - Multi Level Security protection.  

SELINUXTYPE=targeted  

将SELINUX的值设置为:disabled

退出保存,下次重启服务器,SELinux就不会开机启用

你可能感兴趣的:(Docker)