启动docker的时候提示报错,查看报错信息为
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Drop-In: /usr/lib/systemd/system/docker.service.d
└─flannel.conf
Active: failed (Result: exit-code) since Fri 2019-12-27 01:44:06 EST; 5s ago
Docs: http://docs.docker.com
Process: 43369 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdrixy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS
D
O
C
K
E
R
S
T
O
R
A
G
E
O
P
T
I
O
N
DOCKER_STORAGE_OPTION
DOCKERSTORAGEOPTIONADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
Main PID: 43369 (code=exited, status=1/FAILURE)
Dec 27 01:44:05 node1 systemd[1]: Starting Docker Application Container Engine…
Dec 27 01:44:05 node1 dockerd-current[43369]: time=“2019-12-27T01:44:05.186289989-05:00” level=warning msg="could not change group /var/run/docker.sock to docker: group docker
Dec 27 01:44:05 node1 dockerd-current[43369]: time=“2019-12-27T01:44:05.187084604-05:00” level=info msg=“libcontainerd: new containerd process, pid: 43377”
Dec 27 01:44:06 node1 dockerd-current[43369]: Error starting daemon: SELinux is not supported with the overlay2 graph driver on this kernel. Either boot into a newer kernel or
Dec 27 01:44:06 node1 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Dec 27 01:44:06 node1 systemd[1]: Failed to start Docker Application Container Engine.
Dec 27 01:44:06 node1 systemd[1]: Unit docker.service entered failed state.
Dec 27 01:44:06 node1 systemd[1]: docker.service failed.
解决办法:
vi /etc/sysconfig/docker
在OPTIONS后面添加 --selinux-enabled=false
然后重启docker
systemctl restart docker
查看docker
启动成功