'Error initializing graphdriver installing docker on Ubuntu 20.04
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
Solution 1:[1]
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
Solution 2:[2]
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.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | 90linux |
| Solution 2 | Kerby82 |
