美文网首页
docker 无法启动

docker 无法启动

作者: yanghedada | 来源:发表于2018-12-28 14:57 被阅读43次

使用了网上的各种方法就是不能启动。。。。。
找到docker的github的issues从上往下一个试试,最后终于能用了

残忍:

yanghe@Ubuntu:~$ systemctl enable docker.service
Synchronizing state of docker.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable docker
Failed to reload daemon: Access denied
yanghe@Ubuntu:~$ docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
yanghe@Ubuntu:~$ docker images
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
yanghe@Ubuntu:~$ systemctl start docker.service
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

地址docker/for-linux/issues

解决方法:

After remove the file:
/etc/systemd/system/docker.service.d/override.conf
and execute this commands:
systemctl reset-failed docker.service
systemctl start docker.service
The docker service was started.

输入:

sudo rm  /etc/systemd/system/docker.service.d/override.conf
systemctl reset-failed docker.service
systemctl start docker.service

接着操作:

yanghe@Ubuntu:~$ systemctl start docker.service
Warning: The unit file, source configuration file or drop-ins of docker.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
yanghe@Ubuntu:~$ systemctl daemon-reload
yanghe@Ubuntu:~$ systemctl start docker.service
yanghe@Ubuntu:~$ docker iamges
docker: 'iamges' is not a docker command.
See 'docker --help'
yanghe@Ubuntu:~$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE

正常了。。。。。

安装nvidia-docker

阿里云加速:

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
"registry-mirrors": ["https://qndprgwv.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

出错:

$ nvidia-docker image ls
docker: Error response from daemon: Unknown runtime specified nvidia.

解决:

{
    "registry-mirrors": ["https://qndprgwv.mirror.aliyuncs.com"],
    "runtimes": {
        "nvidia": {
            "path": "/usr/bin/nvidia-container-runtime",
            "runtimeArgs": []
         }  
    }
}

sudo systemctl daemon-reload
sudo systemctl restart docker

相关文章

网友评论

      本文标题:docker 无法启动

      本文链接:https://www.haomeiwen.com/subject/jbnslqtx.html