Docker unable to start

When I try to do docker run I get this:

docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.

So I looked here https://github.com/docker/kitematic/issues/1010 and I tried this:

  • Docker dnu restore fails
  • Build container found dead before completing the build. Build container died because it was out of memory, or the Docker image was missing glibc
  • How do I run a docker container based on its name from `docker ps -a`?
  • Running docker container with my own privileges
  • How can I get a docker container to load text from /etc/motd
  • Passenger Still Runs in Production Despite Everything Seeming to Be Correct?
  • docker-machine env default
    

    But I’m getting:

    Error checking TLS connection: exit status 126
    

    So I looked here https://github.com/docker/toolbox/issues/453 and I tried this:

    docker-machine rm default
    

    Now I’m getting:

    Error removing host "default": exit status 126
    

    So what is the issue and how can I solve it?

  • Should I run the init process inside a Docker container or not? [closed]
  • nomad not starting Docker jobs
  • Django Docker settings with link and enviroment
  • what do the docker default iptables mean afer docker maiden installed on Ubuntu 14.04?
  • Multiple Docker containers, same image, different config
  • Practically, what is the difference between docker run -dit vs docker run -d?
  • One Solution collect form web for “Docker unable to start”

    This issue could be caused by a few things:

    1. Permissions – your user does not have the correct access rights to talk to the socket. Runner sudo usermod -aG docker YOUR-USER replacing YOUR-USER to the correct value. Note you will need to completely log out and log back in again for the changes to take effect

    2. Your shell env is not set correctly with docker-machine – Each tab you open in terminal needs to connect to the correct machine if you are to use it correctly try running eval $(docker-machine env default) and then running some docker commands to see if that resolves your issues

    3. Try regenerating the TLS certs for the machine and repeating step 2 – I noticed there was a TLS error. Sometimes the certs for connecting to the daemon can become invalid. Regenerate the certs by running docker-machine regenerate-certs default.

    Update me with your progress and I’ll be happy to help troubleshoot further.

    Hope this helps

    Dylan

    Edit

    1. Try creating a fresh docker machine with docker-machine create -d YOUR-PROVIDER YOUR-NAME and seeing if it is a machine specific issue
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.