Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dial unix /var/run/docker.sock: no such file or directory after upgrading to lxc-docker

Tags:

docker

when I installed docker initially, it shows to be of version 1.0.1 Being, that the current version is 1.4.1, I found and executed the following instructions:

$ sudo apt-get update

$ sudo apt-get install docker.io

$ sudo ln -sf /usr/bin/docker.io /usr/local/bin/docker

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9

$ sudo sh -c "echo deb https://get.docker.io/ubuntu docker main \
> /etc/apt/sources.list.d/docker.list"
$ sudo apt-get update
$ sudo apt-get install lxc-docker

Now, when I run docker version I get 1.4.1, but docker no longer works - it gives me this error:

root@8dedd2fff58e:/# docker version
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): linux/amd64
FATA[0000] Get http:///var/run/docker.sock/v1.16/version: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS? 

What can I do to fox this, but retail the most current docker verion 1.4.1?

like image 355
Eugene Goldberg Avatar asked Feb 10 '15 04:02

Eugene Goldberg


People also ask

What is Unix VAR run Docker sock?

sock is basically the Unix socket the Docker daemon listens on by default. It is also a tool used to communicate with the Docker daemon from within a container. Sometimes, containers need to bind mount the /var/run/docker. sock file.

Is the Docker daemon running Unix?

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 only access it using sudo . The Docker daemon always runs as the root user.

Where is Containerd sock?

service to check the unit file of docker. service, ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd. sock can be found in the default unit file of docker.


1 Answers

/var/run/docker will be created when you start the docker service:

systemd:

sudo systemctl start docker

upstart:

sudo service docker start

init.d:

sudo /etc/init.d/docker start

You might also need this if you get this error: FATA[0000] Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

like image 153
Michael Avatar answered Sep 21 '22 17:09

Michael