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?"
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/watchtowerThen when I want to run a command like:
sudo docker run --rm v2tec/watchtower --label-enableI 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.
馃檹
Most helpful comment
@Happyfeet1 your forgot to add the -v flag