Tried to install Docker to VirtualBox guest working on Ubuntu 16.04 - it doesn't work.
I followed install guide 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
Then I tried to install docker-ce and got errors:
$ 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)
Here is debugging info suggested to see in previous command output:
$ 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.
And another one:
$ 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
...
Also I tried to run Docker in debugging mode, here is output:
$ 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
...
Could not google anything useful. Any suggestions? Thanks in advance.
Update to latests Point-Release or LTS enablement stack
There are some issues which are referring to incompatibilities with older kernel version. Also there is a post, that solves a similar issue by updating to the latests point release.
I would try the latests LTS enablement stack.
Different Storage Drivers
A quick fix could be changing from device mapper to overlayfs as described here (or some other fs, e.g. aufs). Edit the
/etc/docker/daemon.json
file and change the storage driver:There are some more options for that storage driver.