偶然一次在centos中安装启动docker时报错:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
解决办法如下:
- Create the docker group.
sudo groupadd docker
- Add the user to the docker group.
sudo usermod -aG docker $(whoami)
- Log out and log back in to ensure docker runs with correct permissions.
- Start docker.
sudo service docker start