skip to Main Content

I tried to install docker on Ubuntu 20.04 with the following commands:

sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ce

The docker daemon does not startup and the error is this one:

failed to start daemon: error initializing graphdriver: devicemapper: Error running deviceCreate (CreatePool) dm_task_run failed

I tried changing the storage to overlay but did not work

2

Answers


  1. Chosen as BEST ANSWER

    I found the issue. The OS was configured in a way that the load of kernel modules was disabled and docker was not able to modprobe overlay so it failed to start up.


  2. Go to the /var/lib/docker directory and check whether the devicemapper and overlay2 directories exist at the same time. If they exist at the same time, delete the devicemapper directory and restart the docker service

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search