gpt4 book ai didi

Docker服务因依赖而无法启动

转载 作者:行者123 更新时间:2023-12-04 19:30:53 25 4
gpt4 key购买 nike

我有 docker 20.10.6 & CentOS 7.5

-bash-4.2$ docker version
Client: Docker Engine - Community
Version: 20.10.6
API version: 1.41
Go version: go1.13.15
Git commit: 370c289
Built: Fri Apr 9 22:45:33 2021
OS/Arch: linux/amd64
Context: default
Experimental: true
当我尝试运行服务时
sudo systemctl start docker
我得到一个错误
A dependency job for docker.service failed. See 'journalctl -xe' for details.
systemctl 返回这个
systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/etc/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
我正在遵循 https://docs.docker.com/engine/install/centos/ 的指南
我尝试重新安装 docker 和依赖项,尝试使用内容创建/etc/docker/daemon.json 文件
{
"storage-driver": "overlay2"
}
但没有成功
命令
export VERSION_STRING=20.10.6
sudo yum install docker-ce-${VERSION_STRING} docker-ce-cli-${VERSION_STRING} containerd.io
表示没有缺失依赖
journalctl 中的日志信息量不是很大:
sudo journalctl -fu docker
-- Logs begin at .... --
Dependency failed for Docker Application Container Engine.
systemd[1]: Job docker.service/start failed with result 'dependency'.
systemd[1]: Dependency failed for Docker Application Container Engine.
systemd[1]: Job docker.service/start failed with result 'dependency'.
systemd[1]: Dependency failed for Docker Application Container Engine.
systemd[1]: Job docker.service/start failed with result 'dependency'.
systemd[1]: Dependency failed for Docker Application Container Engine.
systemd[1]: Job docker.service/start failed with result 'dependency'.

最佳答案

以下是诀窍

sudo /usr/bin/dockerd -H unix://
所以我以这种方式启动 docker 引擎,然后我可以开始运行容器等。

关于Docker服务因依赖而无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67172101/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com