problem with docker

Solution 1:

After installing Docker you are prompted to add your user to the docker group. Simply run the command shown:

sudo usermod -aG docker $USER

You will need to close your session and log in again to have the change take effect.

Solution 2:

There are two possible reasons why you get this error:

  1. The Docker daemon is not running. You can check that with sudo /etc/init.d/docker status.

  2. The Docker daemon is running but is configured not to listen on /var/run/docker.sock. You can check in /etc/default/docker if any -H option is specified in DOCKER_OPTS.

Solution 3:

Try to reboot your os after docker was installed to apply group permissions, if your user joined docker group..

Update:

When Docker installing on ubuntu 14.04, the installer recomments what your user adds to Docker group to access Docker Service.

Look at

The docker daemon binds to a Unix socket instead of a TCP port. By default that Unix socket is owned by the user root and other users can access it with sudo. For this reason, docker daemon always runs as the root user. To avoid having to use sudo when you use the docker command, create a Unix group called docker and add users to it. When the docker daemon starts, it makes the ownership of the Unix socket read/writable by the docker group.

source: https://docs.docker.com/installation/ubuntulinux/#create-a-docker-group

Solution 4:

try to use sudo docker images to check if there is a containers called <image> in your host.

running docker run <image> will start a container called <image> in your host computer, if your host computer do not have this container, then docker will auto pull a container named '' from repository hub just like the way you running docker pull <image>. Then if it still cannot found a image called '' then it will show this error message.

you can try to replace to hello-world to see if docker is working on your computer.

sudo docker run hello-world

Also, you should check if you should use sudo.

Solution 5:

I found this article helpfull: https://docs.docker.com/articles/systemd/ ; I ran it on multiple environments and worked, hope it helps you too