Error when doing a docker ps

I have Docker installed and it runs fine, but when I have created a container and run it, I want to know the ID of the container, so I do a docker ps. But then I always get this message:

Get http:///var/run/docker.sock/v1.15/containers/json: dial unix /var/run/docker.sock: no such file or directory

What could be wrong here?

  • Is it possible to use Kubernetes for Gitlab build runners and how?
  • Mounted volume is empty inside container
  • What's the difference between Google's Borg and Google's Kubernetes and Docker
  • Accessing enviroment variables from a linked container
  • How to access boot2docker-ip from inside a docker container
  • What is a sparse block device at /dev/xvdf
  • docker: certificate signed by unknown authority even though proxy and --insecure-registry set
  • Using MongoDB Docker on .NET Core
  • Restart existing Docker container with port forwarding
  • Akka and Docker on Marathon
  • Docker - copy file from container to host
  • How to send to stdin of a docker-py container?
  • 2 Solutions collect form web for “Error when doing a docker ps”

    make sure boot2docker is running:

    $boot2docker start

    make sure docker host variable is exposed:

    # Will print boot2docker VM IP
    boot2docker ip
    The VM's Host only interface IP address is:
    # Set docker host variable with value from previous command
    export DOCKER_HOST tcp://

    Check if the docker daemon is running on the boot2docker host

    boot2docker ssh
    ps aux | grep docker
    /usr/local/bin/docker -d ....

    If you are running on Linux make sure you are running as root user

    Make sure you export the docker environment variables:

    where it says

    after you run

    boot2docker start

    and it says:

    To connect the Docker client to the Docker daemon, please set:
    export DOCKER_CERT_PATH=/Users/jbielick/.boot2docker/certs/boot2docker-vm
    export DOCKER_TLS_VERIFY=1
    export DOCKER_HOST=tcp://

    You need to export those variables. Check that they are empty with

    echo $DOCKER_HOST

    and if it’s blank, docker can’t talk to your VM.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.