Everyone. I'm running Docker
Client:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
Server:
Version: 1.8.2
API version: 1.20
Go version: go1.4.2
Git commit: 0a8c2e3
Built: Thu Sep 10 19:19:00 UTC 2015
OS/Arch: linux/amd64
on
Kernel Version: 3.16.0-53-generic
Operating System: Ubuntu 14.04.2 LTS
since few weeks and everything seems fine. I'm able to pull containers for the registry and run them without issues.
Now I wish to use Watchtower to automate their refresh. However, I have a hard time doing so. First, I have tried to run Watchtower as states in the README
docker run -d \
--name watchtower \
-v /var/run/docker.sock:/var/run/docker.sock \
centurylink/watchtower
but after the creation of a new image on Docker Hub and waiting for the default 5 minutes nothing happened.
So I try to access the Watchtower container to see if everything was fine but when I run docker run -t -i centurylink/watchtower /bin/bash
I get
FATA[0000] Get http://unix.sock/v1.15/containers/json?all=0&size=0: dial unix /var/run/docker.sock: no such file or directory. Are you trying to connect to a TLS-enabled daemon without TLS?
The file unix /var/run/docker.sock
exists and the user is a member of the docker group
user@server1:/$ grep 'docker' /etc/group
docker:x:999:user
UPDATE 1 - See comment
If I run docker logs container-id-of-watcher-container
I get
user@server1:~$ docker logs 504ba2eb37fd
time="2016-04-18T06:54:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T06:59:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:04:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:09:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:14:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:19:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:24:30Z" level=info msg="Checking containers for updated images"
time="2016-04-18T07:29:30Z" level=info msg="Checking containers for updated images"
UPDATE 2
I found the issue. I should use the container name and not the image name when scoping Watchtower to a single image.
However, now the question is. How can I update private images?
Thanks.