原文html
剛在新的Centos上安裝Docker-CE,後運行docker run hello-world報錯Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 解決辦法 $ systemctl daemon-reload $ sudo service docker restart $ sudo service docker status (should see active (running)) $ sudo docker run hello-world
docker 客戶端經過unix:///var/run/docker.sock與docker daemon通訊,unix:///var/run/docker.sock須要管理員權限才能訪問,因此要麼運行sudo docker run hello-world,要麼將當前用戶添加在docker用戶組中
sudo usermod -aG docker $USERdocker