0

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) <docker@docker.com>
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.

7
  • Have you tried askubuntu.com/questions/938700/…?
    – Katu
    Sep 26, 2018 at 8:01
  • Try to start docker manually with sudo /usr/bin/dockerd --debug and look through the output. Sep 26, 2018 at 8:02
  • @SimonSudler, result same as for "sudo dockerd -D": ERRO[2018-09-26T13:05:44.090386766+05:00] [graphdriver] prior storage driver devicemapper failed: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed Sep 26, 2018 at 8:06
  • @Katu, don't see nothing new there :( Sep 26, 2018 at 8:07
  • can you check the output of dmesg for some error coming from the device mapper? Sep 26, 2018 at 8:11

1 Answer 1

2

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:

{
   "storage-driver": "overlay2"
}

There are some more options for that storage driver.

7
  • Same errorrs, except "sudo dockerd -D" now shows "ERRO[2018-09-26T13:18:06.984205320+05:00] 'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded. storage-driver=overlay2" Sep 26, 2018 at 8:19
  • Are you sure, that you are on Ubuntu 16.04? Because that sounds not like a standard kernel. What kernel version is reported in cat /proc/version? Sep 26, 2018 at 8:22
  • Linux version 4.4.0-87-generic (buildd@lcy01-31) (gcc version 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.4) ) #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 Sep 26, 2018 at 9:24
  • The current Xenial version is Ubuntu-4.4.0-136.162, so you are running 1 year old kernel... is there a reason for that? Sep 26, 2018 at 10:22
  • Upgraded to 4.4.0-135-generic (4.4.0-136.162 you mentioned is not available for some unknown reason), docker installed and runs successfully, thanks Sep 26, 2018 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.