Docker command can't connect to Docker daemon

后端 未结 23 3129
有刺的猬
有刺的猬 2020-12-02 04:01

I want to make a move to Docker, so I\'ve just started to mess around with it. I\'ve installed Docker on a VirtualBox Ubuntu 15.10 (Wily Werewolf) installation and as sugges

23条回答
  •  执笔经年
    2020-12-02 04:26

    Perhaps this will help someone, as the error message is extremely unhelpful, and I had gone through all of the standard permission steps numerous times to no avail.

    Docker occasionally leaves ghost environment variables in place that block access, despite your system otherwise being correctly set up. The following shell commands may make it accessible again, if you have had it running at one point and it just stopped cooperating after a reboot:

    unset DOCKER_HOST
    unset DOCKER_TLS_VERIFY
    unset DOCKER_TLS_PATH
    docker ps
    

    I had a previously working docker install, and after rebooting my laptop it simply refused to work. Was correctly added to the docker user group, had the correct permissions on the socket, etc, but could still not run docker login, docker run ..., etc. This fixed it for me. Unfortunately I have to run this on each reboot. This is mentioned on a couple of github issues also as a workaround, although it seems like a bug that this is a persistent barrier to correct operation of Docker (note: I am on Arch Linux, not OSX, but this was the same issue for me).

提交回复
热议问题