docker.service 在 Linux Mint 18.3 下未启动

docker.service 在 Linux Mint 18.3 下未启动

在运行 x64 Linux Mint 18.3 Cinnamon 的笔记本上,我尝试安装 Docker:

sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
  --recv-keys 58118E89F3A912897C070ADBF76221572C52609D

sudo apt-add-repository 'deb https://apt.dockerproject.org/repo 
ubuntu-xenial main'

sudo apt update

sudo apt install linux-image-generic linux-image-extra-virtual

sudo apt install docker-engine

仅在最后一步,该过程失败。我猜它实际上正在安装软件,但我的系统无法执行Docker服务:

Job for docker.service failed because the control process exited with 
error code. See "systemctl status docker.service" and "journalctl -xe" 
for details.
invoke-rc.d: initscript docker, action "start" failed.
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor 
preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Di 2018-
02-
27 10:45:35 CET; 17ms ago
Docs: https://docs.docker.com
Process: 9906 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, 
status=1/FAILURE)
Main PID: 9906 (code=exited, status=1/FAILURE)

Feb 27 10:45:35 silberpfeil systemd[1]: Failed to start Docker 
Application Container Engine.
Feb 27 10:45:35 silberpfeil systemd[1]: docker.service: Unit entered 
failed state.
Feb 27 10:45:35 silberpfeil systemd[1]: docker.service: Failed with 
result 'exit-code'.

“Silberpfeil”是我的系统的名称。在此错误协议中,有一个提示说我应该在下面查找此错误

  • “systemctl 状态 docker.service”
  • “journalctl-xe”

第一个返回:

● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor 
preset: enabled)
Active: inactive (dead) (Result: exit-code) since Di 2018-02-27 
10:45:38 CET; 9min ago
Docs: https://docs.docker.com
Process: 10011 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, 
status=1/FAILURE)
Main PID: 10011 (code=exited, status=1/FAILURE)

Feb 27 10:45:38 silberpfeil systemd[1]: Failed to start Docker 
Application Container Engine.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Unit entered 
failed state.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Failed with 
result 'exit-code'.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Service hold-
off time over, scheduling restart.
Feb 27 10:45:38 silberpfeil systemd[1]: Stopped Docker Application 
Container Engine.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Start request 
repeated too quickly.
Feb 27 10:45:38 silberpfeil systemd[1]: Failed to start Docker 
Application Container Engine.

第二个说的太多了,无法在这里发布。只要你不需要它的帮助。俯瞰它,我可以通过 grep 查看来看到 Docker 的内容:

Feb 27 10:45:37 silberpfeil dockerd[10011]: time="2018-02-
27T10:45:37.123564185+01:00" level=info msg="libcontainerd: new 
containerd process, pid: 10033"
Feb 27 10:45:38 silberpfeil dockerd[10011]: time="2018-02-
27T10:45:38.129863280+01:00" level=warning msg="failed to rename 
/var/lib/docker/tmp for background deletion: %!s(<nil>). Deleting 
synchronously"
Feb 27 10:45:38 silberpfeil dockerd[10011]: time="2018-02-
27T10:45:38.140660647+01:00" level=error msg="[graphdriver] prior 
storage driver aufs failed: driver not supported"
Feb 27 10:45:38 silberpfeil dockerd[10011]: Error starting daemon: 
error initializing graphdriver: driver not supported
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Main process 
exited, code=exited, status=1/FAILURE
-- Subject: Unit docker.service has failed
-- Unit docker.service has failed.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Unit entered 
failed state.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Failed with 
result 'exit-code'.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Service hold-
off time over, scheduling restart.
-- Subject: Unit docker.service has finished shutting down
-- Unit docker.service has finished shutting down.
-- Subject: Unit docker.socket has finished shutting down
-- Unit docker.socket has finished shutting down.
-- Subject: Unit docker.socket has begun shutting down
-- Unit docker.socket has begun shutting down.
-- Subject: Unit docker.socket has begun start-up
-- Unit docker.socket has begun starting up.
-- Subject: Unit docker.socket has finished start-up
-- Unit docker.socket has finished starting up.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.service: Start request 
repeated too quickly.
-- Subject: Unit docker.service has failed
-- Unit docker.service has failed.
Feb 27 10:45:38 silberpfeil systemd[1]: docker.socket: Unit entered 
failed state.

有人能找到东西吗?

答案1

感谢这些评论,我没有再次忽略有关不支持的驱动程序的部分,并发现,这实际上是关于 AUFS 驱动程序,即所谓的 graphdriver。

在互联网搜索引擎中查找“不支持 docker graphdriver”给了我以下提示:https://askubuntu.com/questions/870889/cant-start-docker-on-ubuntu-16-04-with-driver-not-supported-error#870890。所以对我来说,要做的就是

sudo rm -rf /var/lib/docker/aufs

有关更多详细信息,请参阅链接的答案。

相关内容