记录docker启动中错误

前两天刚装好虚拟机,然后装了docker,我现在想用docker部署gitlab,昨天装好启动没问题,但是关闭虚拟机以后再开启就报错了
docker run -d -p 443:443 -p 80:80 -p 222:22 --name gitlab --restart always -v /home/gitlab/config:/etc/gitlab -v /home/gitlab/logs:/var/log/gitlab -v /home/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce
报错信息如下:
docker: Error response from daemon: 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.

我在网上查了好久,才找到,原来是我的selinux问题

永久解决办法(需重启):

1.vim /etc/selinux/config--->2.重启虚拟机--->启动docker

image.png

临时解决办法:
# setenforce 0

你可能感兴趣的:(记录docker启动中错误)