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

猜你喜欢

转载自www.cnblogs.com/lieweidu/p/12050053.html
今日推荐