简体   繁体   English

初始化 graphdriver 在 Ubuntu 上安装 docker 时出错 20.04

[英]Error initializing graphdriver installing docker on Ubuntu 20.04

I tried to install docker on Ubuntu 20.04 with the following commands:我尝试使用以下命令在 Ubuntu 20.04 上安装 docker:

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: docker 守护进程没有启动,错误是这个:

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我尝试将存储更改为overlay但没有用

Go to the /var/lib/docker directory and check whether the devicemapper and overlay2 directories exist at the same time. Go到/var/lib/docker docker目录下,检查devicemapperoverlay2目录是否同时存在。 If they exist at the same time, delete the devicemapper directory and restart the docker service如果同时存在,删除devicemapper目录,重启docker服务

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.操作系统的配置方式是禁用 kernel 模块的加载,docker 无法进行modprobe overlay ,因此无法启动。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM