【问题标题】:CentOS 7 - Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?CentOS 7 - 无法在 unix:///var/run/docker.sock 连接到 Docker 守护程序。 docker 守护进程是否正在运行?
【发布时间】:2020-07-23 09:47:00
【问题描述】:

我尝试在 CentOS 7 中安装 docker,但出现守护程序错误。我尝试了互联网上所有可用的安装和调试方法,但没有一个真正奏效!我什至尝试安装也无法使用的旧版本的 docker。

SELinux 已禁用。

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

码头工人版本

Client:
 Version:         1.13.1
 API version:     1.26
 Package version: 
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

systemctl status docker.service -l

Redirecting to /bin/systemctl status  -l docker.service
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2020-04-10 18:00:02 CEST; 49min ago
     Docs: http://docs.docker.com
  Process: 4510 ExecStart=/usr/bin/dockerd-current --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current --default-runtime=docker-runc --exec-opt native.cgroupdriver=systemd --userland-proxy-path=/usr/libexec/docker/docker-proxy-current --init-path=/usr/libexec/docker/docker-init-current --seccomp-profile=/etc/docker/seccomp.json $OPTIONS $DOCKER_STORAGE_OPTIONS $DOCKER_NETWORK_OPTIONS $ADD_REGISTRY $BLOCK_REGISTRY $INSECURE_REGISTRY $REGISTRIES (code=exited, status=1/FAILURE)
 Main PID: 4510 (code=exited, status=1/FAILURE)

Apr 10 18:00:01 ns3138286 systemd[1]: Starting Docker Application Container Engine...
Apr 10 18:00:01 ns3138286 dockerd-current[4510]: time="2020-04-10T18:00:01.506877169+02:00" level=info msg="libcontainerd: new containerd process, pid: 4522"
Apr 10 18:00:02 ns3138286 dockerd-current[4510]: time="2020-04-10T18:00:02.514107274+02:00" level=error msg="'overlay' not found as a supported filesystem on this host. Please ensure kernel is new enough and has overlay support loaded."
Apr 10 18:00:02 ns3138286 dockerd-current[4510]: Error starting daemon: error initializing graphdriver: driver not supported
Apr 10 18:00:02 ns3138286 systemd[1]: docker.service: main process exited, code=exited, status=1/FAILURE
Apr 10 18:00:02 ns3138286 systemd[1]: Failed to start Docker Application Container Engine.
Apr 10 18:00:02 ns3138286 systemd[1]: Unit docker.service entered failed state.
Apr 10 18:00:02 ns3138286 systemd[1]: docker.service failed.

【问题讨论】:

标签: docker centos


【解决方案1】:

如果没有更多细节,很难为这个问题提供一个准确的解决方案,但是,错误信息很清楚:

在此主机上找不到“覆盖”作为受支持的文件系统

请注意:

要将 Docker 配置为使用覆盖存储驱动程序,您的 Docker 主机必须运行 3.18 版的 Linux 内核(最好 newer) 加载了覆盖内核模块。

uname -r检查内核版本

如果您在安装 docker 后安装了新内核,请尝试重新启动您的机器。

如果您没有明确需要覆盖,您还可以在 /etc/docker/daemon.json 文件中指定存储驱动程序 - 'devicemapper' 是内核的首选存储驱动程序不支持叠加。

【讨论】:

  • 谢谢你!我设法通过最新版本的官方文档安装了docker!但是,它以前不起作用!
  • @NoorQureshi 很高兴听到!
猜你喜欢
  • 2022-07-07
  • 2017-11-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-13
相关资源
最近更新 更多