我在Ubuntu 16.04上安装Docker CE时遇到此错误:
> 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-05-23 17:49:42 IST; 3ms ago
> Docs: https://docs.docker.com Process: 9708 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
> Main PID: 9708 (code=exited, status=1/FAILURE)
>
> May 23 17:49:42 HMECD001209 systemd[1]: Failed to start Docker
> Application Container Engine. May 23 17:49:42 HMECD001209 systemd[1]:
> docker.service: Unit entered failed state. May 23 17:49:42 HMECD001209
> 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
> Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing
> triggers for systemd (229-4ubuntu21.2) ... Processing triggers for
> ureadahead (0.100.0-19) ... Errors were encountered while processing:
> docker-ce E: Sub-process /usr/bin/dpkg returned an error code (1)
有什么建议吗?
答案 0 :(得分:1)
sudo nano /etc/docker/daemon.json 加上这个, { “存储驱动程序”:“overlay2” } 编辑这个, sudo nano / etc / default / docker 加上这个。 DOCKER_OPTS =“ - s overlay” 然后sudo systemctl daemon-reload sudo systemctl重启docker,它会工作。
答案 1 :(得分:0)
根据docker官方安装指南,有三种方法可以在ubuntu上安装docker ce:
参考。 https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository
建议:首先在Ubuntu上轻松安装docker ce,只需确保安装最新的稳定版本而不是edge,直到您对edge有特定要求。 请不要忘记在开始之前阅读官方安装指南。