Docker 无法在 Ubuntu 18.04 LTS 上启动journalctl -xe
:
-- Unit docker.service has begun starting up.
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36.651922900+01:00" level=info msg="libcontainerd: started new docker-containerd process" pid=30689
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="starting containerd" module=containerd revision=773c489c9c1b21a6d78b5c538cd395416ec50f88 version=v1.0.3
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.content.v1.content"..." module=containerd type=io.containerd.content.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.btrfs"..." module=containerd type=io.containerd.snapshotter.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=warning msg="failed to load plugin io.containerd.snapshotter.v1.btrfs" error="path /var/lib/docker/containerd/daemon/io.containerd
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.snapshotter.v1.overlayfs"..." module=containerd type=io.containerd.snapshotter.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.metadata.v1.bolt"..." module=containerd type=io.containerd.metadata.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=warning msg="could not use snapshotter btrfs in metadata plugin" error="path /var/lib/docker/containerd/daemon/io.containerd.snaps
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.differ.v1.walking"..." module=containerd type=io.containerd.differ.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.gc.v1.scheduler"..." module=containerd type=io.containerd.gc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.containers"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.content"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.diff"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.events"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.healthcheck"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.images"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.leases"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.namespaces"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.snapshots"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.monitor.v1.cgroups"..." module=containerd type=io.containerd.monitor.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.runtime.v1.linux"..." module=containerd type=io.containerd.runtime.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.tasks"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.version"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="loading plugin "io.containerd.grpc.v1.introspection"..." module=containerd type=io.containerd.grpc.v1
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg=serving... address="/var/run/docker/containerd/docker-containerd-debug.sock" module="containerd/debug"
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg=serving... address="/var/run/docker/containerd/docker-containerd.sock" module="containerd/grpc"
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36+01:00" level=info msg="containerd successfully booted in 0.007536s" module=containerd
Jun 09 12:36:36 James-DevPC kernel: device-mapper: table: 253:0: thin-pool: unknown target type
Jun 09 12:36:36 James-DevPC kernel: device-mapper: ioctl: error adding target to table
Jun 09 12:36:36 James-DevPC dockerd[30680]: time="2018-06-09T12:36:36.824772814+01:00" level=error msg="[graphdriver] prior storage driver devicemapper failed: devicemapper: Error running deviceCreate (CreatePool)
Jun 09 12:36:36 James-DevPC dockerd[30680]: Error starting daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
Jun 09 12:36:36 James-DevPC systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Jun 09 12:36:36 James-DevPC systemd[1]: docker.service: Failed with result 'exit-code'.
Jun 09 12:36:36 James-DevPC systemd[1]: Failed to start Docker Application Container Engine.
几乎尝试了所有方法,现在我都抓狂了,有什么想法吗?
答案1
我可以按照以下步骤在 Ubuntu 18.04 LTS 中安装 docker-ce本教程-
本质上你将运行以下命令 -
首先安装依赖项 -
$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
将官方 Docker 存储库的 GPG 密钥添加到系统:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
使用以下命令将 sources.list.d 中的 Docker 存储库添加到 APT 源
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge"
验证你是否能够从 Docker 存储库安装 Docker
$ apt-cache policy docker-ce
最后,使用以下命令安装 Docker CE 包 -
$ sudo apt-get install -y docker-ce
瞧,你已经安装了 Docker-CE。你可以通过检查安装的 docker-ce 版本来验证安装是否成功
$ docker --version