[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