Watchtower: Cannot connect to the Docker daemon

Created on 21 Jul 2018  路  6Comments  路  Source: containrrr/watchtower

watchtower container can't access the docker.sock. Other containers can access it just fine.
SELinux is not enabled on the machine.

I am running watchtower with the following command:
sudo docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ v2tec/watchtower

Then when I want to run a command like:
sudo docker run --rm v2tec/watchtower --label-enable

I get the following error message:
time="2018-07-21T15:54:04Z" level=fatal msg="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

Question

Most helpful comment

@Happyfeet1 your forgot to add the -v flag

All 6 comments

I have the same problem..

root@h2744217:/# sudo docker run --rm v2tec/watchtower --debug
time="2018-08-20T17:21:49Z" level=debug msg="Retrieving running containers"
time="2018-08-20T17:21:49Z" level=fatal msg="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

I decided to leave the watchtower container running on my test system. The containers do actually seem to get updated. But I'm still getting the error when trying to interact via terminal.

I have the same problem. Is it related to the linux version? Is there anyone to help?

@Happyfeet1 your forgot to add the -v flag

It works

watchtower container can't access the docker.sock. Other containers can access it just fine.
SELinux is not enabled on the machine.

I am running watchtower with the following command:
sudo docker run -d \ --name watchtower \ -v /var/run/docker.sock:/var/run/docker.sock \ v2tec/watchtower

Then when I want to run a command like:
sudo docker run --rm v2tec/watchtower --label-enable

I get the following error message:
time="2018-07-21T15:54:04Z" level=fatal msg="Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

This is because you're not mount the unix socket in the second command you display. sudo docker run --rm -v /var/run/docker.sock:/var/run/docker.sock v2tec/watchtower --label-enable would solve the issue.

馃檹

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ag0r4n picture ag0r4n  路  4Comments

auanasgheps picture auanasgheps  路  6Comments

darox picture darox  路  5Comments

andreo picture andreo  路  6Comments

mlmnetcologne picture mlmnetcologne  路  3Comments