1.修改配置文件/lib/systemd/system/docker.service去掉“-s=overlay”
2.重载配置
root@ubuntu_138:~# systemctl daemon-reload
3.重启docker
root@ubuntu_138:~# systemctl stop docker
root@ubuntu_138:~# systemctl start docker
报错:
●Job for docker.service failed because the control process exited with error code.
See “systemctl status docker.service” and “journalctl -xe” for details.
root@ubuntu_138:~# systemctl status docker.service
docker.service – Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-03-27 19:50:25 PDT; 6s ago
Docs: https://docs.docker.com
Process: 26393 ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376 –insecure-registry=192.8.19.140 (code=exited, status=1/FAILURE)
Main PID: 26393 (code=exited, status=1/FAILURE)

Mar 27 19:50:23 ubuntu_138 systemd[1]: Starting Docker Application Container Engine…
Mar 27 19:50:24 ubuntu_138 dockerd[26393]: time=”2017-03-27T19:50:23.999628278-07:00″ level=warning msg=”[!] DON’T BIND ON ANY IP ADDRESS WITHOUT setting -tlsverify IF YOU DON’T KNOW WHAT YOU’RE DOING [
Mar 27 19:50:24 ubuntu_138 dockerd[26393]: time=”2017-03-27T19:50:24.003153122-07:00″ level=info msg=”libcontainerd: new containerd process, pid: 26396″
Mar 27 19:50:25 ubuntu_138 dockerd[26393]: Error starting daemon: error initializing graphdriver: /var/lib/docker contains several valid graphdrivers: aufs, overlay; Please cleanup or explicitly choose
Mar 27 19:50:25 ubuntu_138 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Mar 27 19:50:25 ubuntu_138 systemd[1]: Failed to start Docker Application Container Engine.
Mar 27 19:50:25 ubuntu_138 systemd[1]: docker.service: Unit entered failed state.
Mar 27 19:50:25 ubuntu_138 systemd[1]: docker.service: Failed with result ‘exit-code’.

4.解决方法:删掉overlay目录,重启docker
root@ubuntu_138:~# rm -fr /var/lib/docker/overlay -fr

Comments are closed.

Post Navigation