After I update my Docker version to 0.8.0
, I get an error message while entering sudo docker version
:
Client version: 0.8.0
Go version (client): go1.2
Git commit (client): cc3a8c8
2014/02/19 12:54:16 Can't connect to docker daemon. Is 'docker -d' running on this host?
And I've followed the instructions and entered command sudo docker -d
, and I got this:
[/var/lib/docker|2462000b] +job initserver()
[/var/lib/docker|2462000b.initserver()] Creating server
open /var/lib/docker/aufs/layers/cf2414da53f9bcfaa48bc3d58360d7f1cfd3784e4fe51fbef95197709dfc285d: no such file or directory[/var/lib/docker|2462000b] -job initserver() = ERR (1)
2014/02/19 12:55:57 initserver: open /var/lib/docker/aufs/layers/cf2414da53f9bcfaa48bc3d58360d7f1cfd3784e4fe51fbef95197709dfc285d: no such file or directory
How do I solve the problem?
This usually happens when you are not in the
docker
group. You can add yourself to thedocker
group with:or
After this, you need to logout and log back into the server.
Alternatively, you can
sudo
every Docker command.If all the other solutions above don't work you can try checking the ownership of
/var/run/docker.sock
:If you're not the owner then change ownership with the command:
Then you can go ahead and try executing the Docker commands hassle-free :D
I just had the same issue, running on Amazon AWS.
Here's what I attempted:
docker-machine
locally with already existing AWS instancedockerd
did work...It was tested following on the remote machine:
I removed
/var/lib/docker
and uninstalled everything, but there was no success after reinstallation. Unfortunately I have no logs stored from failures, butdocker.service
just refused to start.However, what finally solved my issue was basically:
Try to change the Docker configuration file,
docker
ordocker-network
in/etc/sysconfig
:(... ~ v1.17)
docker
file:or (v1.18):
docker-network
file:I restart Docker after installing it:
And it works.
I have faced this problem, and I restarted Docker using these commands:
But I did not solve my problem, because I forgot to execute my Docker commands without
sudo
. For those who faces this problem, try to check that.Try
instead of this: