docker升级后启动失败 需要指定storage driver
创始人
2024-05-28 17:41:47
0

问题描述:

闲来无事就在开发电脑上执行了下sudo apt-get upgrade 升级下软件, 升级后docker启动失败.

使用 journalctl -xeu docker.service 查看docker执行日志:

Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.351879912+08:00" level=warning msg="Base device already exists and has filesystem ext4 on it. User specified filesystem will be ignored." storage-driver=devicemapper
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.399328995+08:00" level=error msg="[graphdriver] prior storage driver devicemapper is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.399328995+08:00" level=error msg="[graphdriver] prior storage driver devicemapper is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information"
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.404671636+08:00" level=info msg="[core] [Channel #1] Channel Connectivity change to SHUTDOWN" module=grpc
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.404711920+08:00" level=info msg="[core] [Channel #1 SubChannel #2] Subchannel Connectivity change to SHUTDOWN" module=grpc
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.404731839+08:00" level=info msg="[core] [Channel #1 SubChannel #2] Subchannel deleted" module=grpc
Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.404739619+08:00" level=info msg="[core] [Channel #1] Channel deleted" module=grpc
Mar 04 16:48:10 pop-os dockerd[39273]: failed to start daemon: error initializing graphdriver: prior storage driver devicemapper is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/Mar 04 16:48:10 pop-os dockerd[39273]: failed to start daemon: error initializing graphdriver: prior storage driver devicemapper is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information
Mar 04 16:48:10 pop-os systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ An ExecStart= process belonging to unit docker.service has exited.
░░
░░ The process' exit code is 'exited' and its exit status is 1.
Mar 04 16:48:10 pop-os systemd[1]: docker.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ The unit docker.service has entered the 'failed' state with result 'exit-code'.
Mar 04 16:48:10 pop-os systemd[1]: Failed to start Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ A start job for unit docker.service has finished with a failure.
░░
░░ The job identifier is 2047 and the job result is failed.
Mar 04 16:48:12 pop-os systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
░░ Subject: Automatic restarting of a unit has been scheduled
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░
░░ Automatic restarting of the unit docker.service has been scheduled, as the result for
░░ the configured Restart= setting for the unit.
Mar 04 16:48:12 pop-os systemd[1]: Stopped Docker Application Container Engine.
░░ Subject: A stop job for unit docker.service has finished
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support

解决方法:

从运行日志里找到关键错误信息:

Mar 04 16:48:10 pop-os dockerd[39273]: time="2023-03-04T16:48:10.399328995+08:00" level=error msg="[graphdriver] prior storage driver devicemapper is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/

大致意思就是先前使用的storage driver类型devicemapper现在不推荐使用了,以后有可能以后就废弃掉了。现在都有哪些storage driver呢?可以点开后面给的链接自己看。如果要继续使用devicemapper需要显示指定。我现在就想让docker现在能运行起来先,找到对应配置项storage-driver添加到/etc/docker/dameon.json文件中.

{
"data-root": "/data3/docker",
"storage-driver": "devicemapper"
}

修改后docker就能正常启动了

相关内容

热门资讯

监控摄像头接入GB28181平... 流程简介将监控摄像头的视频在网站和APP中直播,要解决的几个问题是:1&...
Windows10添加群晖磁盘... 在使用群晖NAS时,我们需要通过本地映射的方式把NAS映射成本地的一块磁盘使用。 通过...
protocol buffer... 目录 目录 什么是protocol buffer 1.protobuf 1.1安装  1.2使用...
在Word、WPS中插入AxM... 引言 我最近需要写一些文章,在排版时发现AxMath插入的公式竟然会导致行间距异常&#...
【PdgCntEditor】解... 一、问题背景 大部分的图书对应的PDF,目录中的页码并非PDF中直接索引的页码...
修复 爱普生 EPSON L4... L4151 L4153 L4156 L4158 L4163 L4165 L4166 L4168 L4...
Fluent中创建监测点 1 概述某些仿真问题,需要创建监测点,用于获取空间定点的数据࿰...
educoder数据结构与算法...                                                   ...
MySQL下载和安装(Wind... 前言:刚换了一台电脑,里面所有东西都需要重新配置,习惯了所...
MFC文件操作  MFC提供了一个文件操作的基类CFile,这个类提供了一个没有缓存的二进制格式的磁盘...