Loading

Linux中的docker报错 Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

偶然一次在centos中安装启动docker时报错:

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

 

解决办法如下:

  1. Create the docker group.
    sudo groupadd docker
  2. Add the user to the docker group.
    sudo usermod -aG docker $(whoami)
  3. Log out and log back in to ensure docker runs with correct permissions.
  4. Start docker.
    sudo service docker start
posted @ 2019-12-16 17:05  维度Sec  阅读(7084)  评论(0编辑  收藏  举报