Centos7安装Docker无法启动问题
安装完成后查看版本
启动docker: #systemctl start docker
报如下错误:
Job for docker.service failed because the control process exited with error code. See "syste mctl status docker.service" and "journalctl -xe" for details.
查看错误详情:
#systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled
)
Active: failed (Result: exit-code) since Wed 2019-02-13 01:39:01 EST; 1min 21s ago
Docs: http://docs.docker.com
Process: 5406 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/do
cker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=system
d --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/do
cker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE
_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIE
S (code=exited, status=1/FAILURE)
Main PID: 5406 (code=exited, status=1/FAILURE)
Feb 13 01:39:01 localhost.localdomain systemd[1]: Starting Docker Application Container.....
Feb 13 01:39:01 localhost.localdomain dockerd-current[5406]: unable to configure the Doc...)
Feb 13 01:39:01 localhost.localdomain systemd[1]: docker.service: main process exited, ...RE
Feb 13 01:39:01 localhost.localdomain systemd[1]: Failed to start Docker Application Co...e.
Feb 13 01:39:01 localhost.localdomain systemd[1]: Unit docker.service entered failed state.
Feb 13 01:39:01 localhost.localdomain systemd[1]: docker.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
解决方法:
打开该文件:# vi /etc/sysconfig/docker
将OPTIONS该行注释起来
#OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'
再次启动 查看docker版本:
[root@localhost ~]# systemctl start docker
[root@localhost ~]# docker version
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-88.git07f3374.el7.centos.x86_64
Go version: go1.9.4
Git commit: 07f3374/1.13.1
Built: Fri Dec 7 16:13:51 2018
OS/Arch: linux/amd64
Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-88.git07f3374.el7.centos.x86_64
Go version: go1.9.4
Git commit: 07f3374/1.13.1
Built: Fri Dec 7 16:13:51 2018
OS/Arch: linux/amd64
Experimental: false