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:

  • Ansible docker_container module env file
  • Why when I switch to a different user environment variable is lost?
  • Automatic way to pick up the hostname inside docker container
  • Mount a windows host directory in compose file version 3
  • Jenkins shell script execution on different server
  • Installing a specific version of docker-engine (v1.7+) on Ubuntu?
  • 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?

  • How to disable chrome to use gpu in docker environment
  • Docker memory leak with sonarqube
  • Can a Docker Task in a Swarm know which instance number or how many total instances there are?
  • Update a Docker Image on an EC2 Instance
  • how to inspect docker's running container files
  • Can docker use the existing host system to run a command in isolation like lxc-execute
  • 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.