永久改变 SELinux 状态: vi /etc/sysconfig/selinux 1.2 SELinux 建议禁用SELinux,让容器可以读取主机文件系统 执行命令: 1 # getenforce #查看selinux状态 2 # setenforce 0 #临时关闭selinux 3 # sed -i 's/^ *SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config #永久关闭(需重启系统) 4 # shutdown -r now #重启系统