1. 程式人生 > >安裝docker成功後,啟動docker報錯,解決方法

安裝docker成功後,啟動docker報錯,解決方法

[[email protected] ~]# systemctl restart docker

Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details. [[email protected] ~]# systemctl status docker.service ● docker.service - Docker Application Container Engine    Loaded: loaded (/usr/lib/systemd/system/docker.service; enabled; vendor preset: disabled)    Active: failed (Result: exit-code) since Mon 2018-01-22 23:31:10 CST; 5s ago      Docs: http://docs.docker.com   Process: 17943 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 $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)  Main PID: 17943 (code=exited, status=1/FAILURE)

Jan 22 23:31:09 master01 systemd[1]: Starting Docker Application Container Engine... Jan 22 23:31:09 master01 dockerd-current[17943]: time="2018-01-22T23:31:09.315315148+08:00" level=info msg="libcontainerd: new containerd process, pid: 17954" Jan 22 23:31:10 master01 dockerd-current[17943]: time="2018-01-22T23:31:10.329514525+08:00" level=fatal msg="Error starting daemon: error initializing graphdriver: devmapper..._devices\n" Jan 22 23:31:10 master01 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE Jan 22 23:31:10 master01 systemd[1]: Failed to start Docker Application Container Engine. Jan 22 23:31:10 master01 systemd[1]: Unit docker.service entered failed state. Jan 22 23:31:10 master01 systemd[1]: docker.service failed. Hint: Some lines were ellipsized, use -l to show in full.

處理方法

vim /etc/sysconfig/docker-storage

DOCKER_STORAGE_OPTIONS=

vim /etc/sysconfig/docker

OPTIONS='--selinux-enabled --log-driver=journald --signature-verification=false'

# vim /etc/docker/daemon.json

{ "storage-driver": "devicemapper" }

最後重啟docker

[[email protected] ~]# systemctl restart docker ---------------------  作者:liu9718214  來源:CSDN  原文:https://blog.csdn.net/liu9718214/article/details/79134900  版權宣告:本文為博主原創文章,轉載請附上博文連結!