Docker在VirtualBox guest虚拟机上的Ubuntu 16.04上不起作用

德米特里·维诺库罗夫

尝试将 Docker 安装到在 Ubuntu 16.04 上工作的 VirtualBox 来宾 - 它不起作用。

我遵循了安装指南https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository

$ sudo apt install apt-transport-https ca-certificates curl software-properties-common
...
done.

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK

$ sudo apt-key fingerprint 0EBFCD88
pub   4096R/0EBFCD88 2017-02-22
      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88
uid                  Docker Release (CE deb) <[email protected]>
sub   4096R/F273FCD8 2017-02-22

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

$ sudo apt-get update
...
Reading package lists... Done

然后我尝试安装 docker-ce 并出现错误:

$ sudo apt-get install docker-ce
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  docker-ce
0 upgraded, 1 newly installed, 0 to remove and 121 not upgraded.
Need to get 0 B/40.0 MB of archives.
After this operation, 198 MB of additional disk space will be used.
Selecting previously unselected package docker-ce.
(Reading database ... 72543 files and directories currently installed.)
Preparing to unpack .../docker-ce_18.06.1~ce~3-0~ubuntu_amd64.deb ...
Unpacking docker-ce (18.06.1~ce~3-0~ubuntu) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up docker-ce (18.06.1~ce~3-0~ubuntu) ...
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 Wed 2018-09-26 11:35:03 +05; 4ms ago
     Docs: https://docs.docker.com
  Process: 17078 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 17078 (code=exited, status=1/FAILURE)

Sep 26 11:35:03 build-server systemd[1]: Failed to start Docker Application Container Engine.
Sep 26 11:35:03 build-server systemd[1]: docker.service: Unit entered failed state.
Sep 26 11:35:03 build-server systemd[1]: docker.service: Failed with result 'exit-code'.
dpkg: error processing package docker-ce (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

以下是建议在之前的命令输出中查看的调试信息:

$ systemctl status docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Wed 2018-09-26 11:35:04 +05; 1min 20s ago
     Docs: https://docs.docker.com
  Process: 17200 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
 Main PID: 17200 (code=exited, status=1/FAILURE)

Sep 26 11:35:04 build-server systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 11:35:04 build-server systemd[1]: Failed to start Docker Application Container Engine.
Sep 26 11:35:04 build-server systemd[1]: docker.service: Unit entered failed state.
Sep 26 11:35:04 build-server systemd[1]: docker.service: Failed with result 'exit-code'.
Sep 26 11:35:04 build-server systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Sep 26 11:35:04 build-server systemd[1]: Stopped Docker Application Container Engine.
Sep 26 11:35:04 build-server systemd[1]: docker.service: Start request repeated too quickly.
Sep 26 11:35:04 build-server systemd[1]: Failed to start Docker Application Container Engine.

还有一个:

$ journalctl -xe
...
-- The start-up result is done.
Sep 26 11:35:04 build-server systemd[1]: docker.service: Start request repeated too quickly.
Sep 26 11:35:04 build-server systemd[1]: Failed to start Docker Application Container Engine.
-- Subject: Unit docker.service has failed
...

我还尝试在调试模式下运行 Docker,这是输出:

$ sudo dockerd -D
...
ERRO[2018-09-26T11:39:15.551563104+05:00] [graphdriver] prior storage driver devicemapper failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed
...

Google无法提供任何有用的信息。有什么建议么?提前致谢。

西蒙·萨德勒

更新到最新的 Point-Release 或 LTS 支持堆栈

有一些问题是指与旧内核版本不兼容。还有一个帖子,通过更新到最新版本来解决类似的问题。

我会尝试最新的LTS 启用堆栈

不同的存储驱动程序

快速修复可能是从设备映射器更改为这里描述的覆盖文件(或其他一些文件,例如 aufs)。编辑/etc/docker/daemon.json文件并更改存储驱动程序:

{
   "storage-driver": "overlay2"
}

该存储驱动程序还有更多选项

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

音频在VirtualBox Windows 10 guest虚拟机(macOS主机)上不起作用

在级联上删除在虚拟机上不起作用

Apple Push Notifications在虚拟机上不起作用

键盘在debian jessie主机中的virtualbox ubuntu 15.04 guest虚拟机上无法正常工作

在Ubuntu主机上激活Windows 10 Home VirtualBox guest虚拟机的OEM许可证

ping在Azure上的ubuntu虚拟机上不起作用

如何在Windows 10主机上的Ubuntu 16 Virtual Box guest虚拟机中安装PHP5?

VirtualBox guest虚拟机:检测到16个CPU,但只有1个在线

Docker + Ubuntu + Virtualbox:dockerfile中的“ volumes”指令不起作用

如何将Mac主机上的VirtualBox guest虚拟机Ubuntu克隆到可启动的USB?

尝试在Virtualbox上设置仅主机的网络后,Ubuntu guest虚拟机上的网络无法访问

使用VirtualBox在CentOS 7 guest虚拟机上启用ssh主机到guest虚拟机和guest虚拟机Internet

共享剪贴板在使用Ubuntu 17.10.1的virtualbox上不起作用

Windows KVM guest虚拟机上的16:9长宽比(特别是1366x768)

Yum安装在boot2docker主机上不起作用?

Jekyll站点在docker容器中运行,但localhost:4000在主机上不起作用

Tarantool在Ubuntu 16上不起作用(libbfd-2.26-system.so:无法打开共享对象文件)

VirtualBox闲置Windows guest虚拟机在主机上的CPU使用率很高

VirtualBox:在Linux Guest虚拟机上未检测到USB集线器-MacOS主机

VirtualBox是否可以在32位主机上运行64位guest虚拟机?

在Linux Guest虚拟机上强制显示器分辨率在VirtualBox VM中

OSX主机上VirtualBox中Fedora 27 guest虚拟机的闪烁

在 ubuntu 虚拟机上添加 Docker 的官方 GPG 密钥失败

Sonarqube在Docker上不起作用

DllImport在Docker上不起作用-DllNotFoundException

Webrtc 在主机上不起作用

虚拟机上的Docker Elasticsearch

vncserver空白显示-带Ubuntu 16主机的debian 9 guest虚拟机

ActiveWindow VBA命令访问活动幻灯片在虚拟机上运行的PowerPoint 2013上不起作用