安装无根 docker 失败 - “未找到 Unit docker.service”

问题描述

使用正式说明 here 未按预期工作。

我使用 ubuntu 18.04 和 docker 19.03。

我首先禁用当前的 rootfull docker:

sudo systemctl disable --now docker.service

我可以确认 docker 守护进程已停止,docker version

Client: Docker Engine - Community
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 17:02:36 2020
 OS/Arch:           linux/amd64
 Experimental:      false
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

现在我安装 docker-ce-rootless-extras 包:

sudo apt-get install -y docker-ce-rootless-extras

而且似乎效果很好:

Reading package lists... Done
Building dependency tree
Reading state information... Done
docker-ce-rootless-extras is already the newest version (5:20.10.5~3-0~ubuntu-bionic).
The following packages were automatically installed and are no longer required:
  linux-hwe-5.4-headers-5.4.0-42 linux-hwe-5.4-headers-5.4.0-62
Use 'sudo apt autoremove' to remove them.
0 upgraded,0 newly installed,0 to remove and 81 not upgraded.

现在我要启动守护进程:

systemctl --user start docker

但我收到此错误:

Failed to start docker.service: Unit docker.service not found.

知道是什么问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...