首页 > 其他分享 >Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

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

时间:2022-12-28 10:58:13浏览次数:36  
标签:daemon run var docker root Docker localhost

[root@localhost docker]#
[root@localhost docker]# docker --version
Docker version 1.13.1, build 7d71120/1.13.1
[root@localhost docker]#
[root@localhost docker]# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost docker]#
[root@localhost docker]# docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@localhost docker]#
[root@localhost docker]# systemctl start docker
[root@localhost docker]# docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.13.1
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: journald
Cgroup Driver: systemd
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: docker-runc runc
Default Runtime: docker-runc
Init Binary: /usr/libexec/docker/docker-init-current
containerd version: (expected: aa8187dbd3b7ad67d8e5e3a15115d3eef43a7ed1)
runc version: 8891bca22c049cd2dcf13ba2438c0bac8d7f3343 (expected: 9df8b306d01f59d3a8029be411de015b7304dd8f)
init version: fec3683b971d9c3ef73f284f176672c44b448662 (expected: 949e6facb77383876aeff8a6944dde66b3089574)
Security Options:
seccomp
WARNING: You're not using the default seccomp profile
Profile: /etc/docker/seccomp.json
selinux
Kernel Version: 3.10.0-1160.80.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
Number of Docker Hooks: 3
CPUs: 1
Total Memory: 1.776 GiB
Name: localhost.localdomain
ID: AD2Q:O36A:UIX7:GSNM:Q2AG:NSJ7:J6US:WY3F:YHYA:QVFW:XMGN:45PH
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Registries: docker.io (secure)
[root@localhost docker]#
[root@localhost docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@localhost docker]#
[root@localhost docker]#

------------------------------

1、问题现象,docker ps  出现下面的报错

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

2、问题原因,是docker服务没有开

3、开启docker服务

systemctl start docker

 

标签:daemon,run,var,docker,root,Docker,localhost
From: https://www.cnblogs.com/duanxf/p/17009604.html

相关文章

  • 解读“K8S不支持Docker”
    容器不只是Docker,但不可否认Docker是容器的代名词、容器时代的引领者。实际上K8S出现并得以快速发展,也是由于Docker的强大优势和快速发展,2014 年 Google 推出Kubernetes......
  • Docker 中的挂载卷
    我们现在有这样一个需求。我们有一个Spring的项目是部署在容器中的,如果不进行任何配置的话,这个项目运行的所有日子都会在容器中。当容器重启说着终止后,上面的日志比较难进......
  • Docker网络中篇-docker网络的四种类型
    通过上一篇学习,我们对docker网络有了初步的了解。本篇,咱们就来实战docker网络。docker网络实战实战docker网络,我们将从以下几个案例来讲解1:birdge是什么?2:host3:none4......
  • docker搭建Elasticsearch、Kibana、Logstash 同步mysql数据到ES
    一、前言在数据量大的企业级实践中,Elasticsearch显得非常常见,特别是数据表超过千万级后,无论怎么优化,还是有点力不从心!使用中,最首先的问题就是怎么把千万级数据同步到Elast......
  • docker部署lnmp
    一、构建自定义docker网络12345systemctlstopfirewalldsystemctldisablefirewalldsetenforce0 dockernetworkcreate--subnet=172.18.0.0/16......
  • 解决docker 容器设置中文语言包出现的问题_docker
    https://www.anquanclub.cn/5821.html这篇文章主要介绍了解决docker容器设置中文语言包出现的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧 ......
  • Docker 中的挂载卷
    我们现在有这样一个需求。我们有一个Spring的项目是部署在容器中的,如果不进行任何配置的话,这个项目运行的所有日子都会在容器中。当容器重启说着终止后,上面的日志比较......
  • docker介绍、安装与启动、常用命令(启动、镜像相关、容器相关)
    参考地址:https://www.cnblogs.com/jgx0/p/16319167.html今日内容概要docker介绍docker安装与启动docker常用命令内容详细1、docker介绍1.1什么是虚拟化#在计......
  • Get Docker CE for CentOS
     用户@主机名~%dockerps-aCannotconnecttotheDockerdaemonatunix:///var/run/docker.sock.Isthedockerdaemonrunning?此时已确定Docker本身已经安装正常。......
  • Multi-Runtime多运行时架构
    概念Multi-RuntimeMulti-Runtime是一种服务端架构思路,把应用里的所有中间件挪到Sidecar里,使得“业务运行时”和“技术运行时”分离开。首先来看ServiceMesh,和传统......