(2020.3.18已解决)Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker dae

  • docker run hello-world

    运行docker run hello-world出现如下错误:

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

    此处给出解决方案:

    sudo systemctl start docker
    

    结果出现如下错误:

    System has not been booted with systemd as init system (PID 1). Can't operate.

    此处给出解决方案:

    sudo /etc/init.d/docker start
    

    因为在WSL 2中没有systemd

    运行上述命令,出现 \* Starting Docker: docker

你可能感兴趣的:(Error,Docker)