大网数据广告活动
服务器运维问答

dockerd does not start debian

· 52CE 我爱测

Linux OS: debian11 Everything worked, but I think today after sudo apt upgrade I installed new version of docker. Then docker daemon does not start: $ sudo systemctl start docker Job for docker.service failed because the control …

问题原文

原帖链接 · K.I. · CC BY-SA 4.0

Linux OS: debian11 Everything worked, but I think today after sudo apt upgrade I installed new version of docker. Then docker daemon does not start:

$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

I checked the logs:

Here are the start today

$ sudo journalctl -xu docker.service    
May 27 09:07:11 debian systemd[1]: Started Docker Application Container Engine.
░░ Subject: A start job for unit docker.service has finished successfully
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ A start job for unit docker.service has finished successfully.
░░ 

Then I ran apt update && apt upgrade and docker is not running anymore there is a problem with graph directive not matching configuration..:(

$ sudo journalctl -xu docker.service
May 27 09:20:43 debian dockerd[12661]: unable to configure the Docker daemon with file /etc/docker/daemon.json: the following directives don't match any configuration option: graph
May 27 09:20:43 debian systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE

This is how my daemon.json looks like

$ cat /etc/docker/daemon.json
{
  "graph": "/data/docker/docker-data/"
}

Docker version

$ docker --version
Docker version 24.0.2, build cb74dfc

I tryed to remove docker and reinstall but no luck.

I accept the answer and put the solution here

$ cat /etc/docker/daemon.json 
{
  "data-root" : "/data/docker/docker-data/"
}

已采纳解答

原帖链接 · vidarlo · CC BY-SA 4.0

graph is not supported any more.

The -g or --graph flag for the dockerd or docker daemon command was used to indicate the directory in which to store persistent data and resource configuration and has been replaced with the more descriptive --data-root flag. These flags were deprecated and hidden in v17.05, and removed in v23.0.

You're running v24.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2023-05-27)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。