我跟着导游在 Docker 网站上安装运行docker-engine
在 OmniOS 上的 LX 品牌区域中的 VPS。不幸的是,我在安装过程中遇到了错误,这可能是由于主机的自定义内核造成的。
安装过程的输出是:
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.
dpkg: error processing package docker-engine (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu4) ...
Errors were encountered while processing:
docker-engine
E: Sub-process /usr/bin/dpkg returned an error code (1)
运行建议的systemctl
命令将返回以下内容:
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2017-01-04 21:03:38 UTC; 7min ago
Docs: https://docs.docker.com
Main PID: 27548 (code=exited, status=1/FAILURE)
最后uname
返回以下字符串:
Linux christian 4.4.0 BrandZ virtual linux x86_64 x86_64 x86_64 GNU/Linux
我是否可以查明我遇到的问题是由于内核还是其他原因?
编辑调用将apt-cache policy docker-engine
返回以下输出:
docker-engine:
Installed: (none)
Candidate: 1.12.5-0~ubuntu-xenial
Version table:
1.12.5-0~ubuntu-xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.12.4-0~ubuntu-xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.12.3-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.12.2-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.12.1-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.12.0-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.11.2-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.11.1-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
1.11.0-0~xenial 500
500 https://apt.dockerproject.org/repo ubuntu-xenial/main amd64 Packages
答案1
这可能是因为你将 Ubuntu 从暴发户到系统控制(当你升级到 16.04 时)。并且你已经在暴发户
从中删除docker暴发户将为我解决问题:
sudo rm /etc/init.d/docker
sudo rm /etc/rc*/*docker
再次运行安装后:
sudo apt-get install docker-engine
并检查docker服务是否启动。
sudo systemctl start docker
systemctl status docker.service