出现错误:解决Docker安装成功启动不起来问题:Failed to start Docker Application Container Engine.

参考docker安装成功启动失败

出现错误

在这里插入图片描述

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
[root@localhost ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2020-04-28 21:54:25 PDT; 2min 50s ago
Docs: http://docs.docker.com
Process: 56509 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
Main PID: 56509 (code=exited, status=1/FAILURE)

Apr 28 21:54:24 localhost.localdomain systemd[1]: Starting Docker Application Container Engine...
Apr 28 21:54:24 localhost.localdomain dockerd-current[56509]: time="2020-04-28T21:54:24.289350463-07:00" level=warni...nd"
Apr 28 21:54:24 localhost.localdomain dockerd-current[56509]: time="2020-04-28T21:54:24.301103329-07:00" level=info ...14"
Apr 28 21:54:25 localhost.localdomain dockerd-current[56509]: time="2020-04-28T21:54:25.315685334-07:00" level=warning ...
Apr 28 21:54:25 localhost.localdomain dockerd-current[56509]: Error starting daemon: SELinux is not supported with t...se)
Apr 28 21:54:25 localhost.localdomain systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 28 21:54:25 localhost.localdomain systemd[1]: Failed to start Docker Application Container Engine.
Apr 28 21:54:25 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Apr 28 21:54:25 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
[root@localhost ~]#

解决办法

只需要执行这条命令即可sed -i 's/--selinux-enabled/--selinux-enabled=false/g' /etc/sysconfig/docker
在这里插入图片描述