admin管理员组

文章数量:1612098

在安装好docker容器环境后,启动docker容器时,使用命令docker run hello-world 遇到如下提示

/usr/bin/docker-current: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
See ‘/usr/bin/docker-current run --help’.

使用命令查看docker容器的状态

systemctl status docker

得到如下提示:

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: http://docs.docker

可以看到docker没有启动,安装完成后要启动

systemctl start docker

这里建议把docker设置成开机自启动,命令如下:

systemctl enable docker

问题解决

本文标签: 容器BinCurrentDockerusr