【问题标题】:Docker daemon not starting, even after reinstalling docker on ubuntu 18.04即使在 ubuntu 18.04 上重新安装 docker 后,Docker 守护程序也没有启动
【发布时间】:2019-12-26 19:45:16
【问题描述】:

我收到以下错误,即使在 sudo apt remove docker; sudo apt install docker 之后也是如此:

$ sudo service docker restart
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
$ systemctl status docker.service
● docker.service - LSB: Create lightweight, portable, self-sufficient containers.
   Loaded: loaded (/etc/init.d/docker; generated)
   Active: failed (Result: exit-code) since Thu 2019-12-26 11:37:52 PST; 8s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 28702 ExecStart=/etc/init.d/docker start (code=exited, status=1/FAILURE)
 Main PID: 3450 (code=exited, status=0/SUCCESS)

命令jouralctl -xe 没有显示新条目,而sudo systemctl list-unit-filesdocker.service 显示为generated。我看了一堆关于 SO 的相关问题,但它们似乎是不同的问题。最接近的是Trying a quick cluster deployment with Docker:Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?,但该问题已通过重新安装解决。

我的问题可能是什么,或者接下来的诊断步骤应该是什么?

【问题讨论】:

  • 尝试使用 dockerd 命令在前台手动运行 docker daemon。您应该看到一些有意义的错误(可能缺少某些包,可能是不同的存储驱动程序,..)
  • 我收到此错误:$ dockerd Command 'dockerd' not found, but can be installed with: sudo apt install docker.io 。预计需要单独执行此安装吗?

标签: docker


【解决方案1】:

你确定docker 包是你想要的吗?

$ apt-cache search docker | grep ^'docker '
docker - System tray for KDE3/GNOME2 docklet applications

实际的 docker 包名称取决于您要使用的 Docker 版本和源。好的开始将是来自 Docker 的最新 docker-ce:https://docs.docker.com/install/linux/docker-ce/ubuntu/

当你正确安装了docker,那么你可以使用dockerd进行调试:https://docs.docker.com/config/daemon/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-03-08
    • 1970-01-01
    • 2019-07-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多