My question is relative to the need to symlink /var/run/docker.sock to /volume1/docker/docker.sock because per the Wiki:
Synology Docker GUI will not be able to run it when it's pointed directly to
/var/run/docker.sock
However, this is not true for my Synology. I'm running the latest DSM 6.2 (at the time of writing) instead of 6.0/6.1 (as the Wiki states). In other words, I'm creating my container with the volume /var/run/docker.sock:/var/run/docker.sock without any issues. I can stop/start the watchtower container via the Synology GUI, I can restart my Synology and everything keeps working as expected.
Should the Wiki be updated to mention this is no longer an issue with DSM 6.2 or is something else going on with my NAS making this thing working without the symlink?
Could you provide your docker-compose.yml file?
watchtower:
image: v2tec/watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: watchtower synology-docker-radicale-server --interval 1
restart: unless-stopped
watchtower_watchtower_1 is up-to-date
Attaching to watchtower_watchtower_1
watchtower_1 | WARNING: no logs are available with the 'db' log driver
This is my output and the watchtower is not updating or doing anything..
I don't use docker-compose.yml I ran this directly through SSH:
docker run -d \
--name watchtower \
--restart always \
--network host \
-v /var/run/docker.sock:/var/run/docker.sock \
v2tec/watchtower -i 43200
I don't user
docker-compose.ymlI ran this directly through SSH:docker run -d \ --name watchtower \ --restart always \ --network host \ -v /var/run/docker.sock:/var/run/docker.sock \ v2tec/watchtower -i 43200I do the same, -v /var/run/docker.sock:/var/run/docker.sock on DSM 6.2. No issues, been running like this for a long time.
My last Synology setup I haven't had to do anything either, but I have in the past. I've had some weird issues with Synology's version of Docker or how Synology handles users/groups since it is done by synouser and synogroup commands. I've had permission errors with the symbolic link too and was better off changing the group owner of the docker.sock to the docker group via chown root:docker /var/run/docker.sock and creating a task scheduler for it since things would usually break on update or restart.
Might be best to change it from an install guide to a troubleshooting guide for Synology users in case people still run into it or things change on an update.
Here is my docker-compose.yml. I'm runing a DS918+ with DSM 6.2
version: '2'
services:
watchtower:
container_name: watchtower
restart: unless-stopped
image: v2tec/watchtower
environment:
- TZ=Europe/Berlin
volumes:
- /var/run/docker.sock:/var/run/docker.sock
command: --interval 1000 --cleanup --label-enable
I don't use
docker-compose.ymlI ran this directly through SSH:docker run -d \ --name watchtower \ --restart always \ --network host \ -v /var/run/docker.sock:/var/run/docker.sock \ v2tec/watchtower -i 43200
I get the following error in log. DSM 6.2.1
"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"
@dojo90 I'm assuming you have labels correctly set on your containers? try adding --debug and setting the interval really short to something like --interval 15 so you can see what's going on in your log.
@deten Just to verify, you are running as root?
Here is my
docker-compose.yml. I'm runing aDS918+withDSM 6.2version: '2' services: watchtower: container_name: watchtower restart: unless-stopped image: v2tec/watchtower environment: - TZ=Europe/Berlin volumes: - /var/run/docker.sock:/var/run/docker.sock command: --interval 1000 --cleanup --label-enable
actually everything is working as expected.
so all the comments i am reading on reddit saying dont use watchtower as it destroys stuff isnt valid?
I want to use Watchtower for automated updates, but dont want to nuke anything like i am reading on reddit..
@wifiuk you should of course take proper caution, try it in a test environment first and make sure you have decent backup policies in place; as you probably would for all software.
Other than that, no it does not destroy things and yes it works great 馃憣馃徎馃憤馃徎
Addressed to the guys that got it working on your synology, I鈥檇 be happy to merge any documentation on how to get it to work. I can鈥檛 do it myself however as I don鈥檛 have access to any synology hardware.
Thanks in advance! 馃檹馃徎
Closing due to lack of activity.
thats a shame, no one who has it working safely is happy to share the setup guide :(
@wifiuk stop blaming! This is a volunteer project.
@waja i have not blamed, i just said it was a shame, which is my opinion and valid to say... blaming would be me calling someone out for not doing something directly by name..
If i had a test environment and the time i would do it myself, but i dont..
dont take it personally ....
Search google, there already are some working setup guide. I have done one three month ago here : https://blog.bagu.biz/?post/2019/01/22/Automatiser-la-mise-%C3%A0-jour-des-images-Docker
But in french ;)
I just came across this post and am running into an odd issue that maybe you can help with?
I'm able to get Watcher running in Docker on my Synology with the direct docker run command:
docker run -d \
--name watchtower_test \
--restart always \
--network host \
-v /var/run/docker.sock:/var/run/docker.sock \
-m 209715200 \
containrrr/watchtower:latest \
-i 86400 --cleanup
I then attempted to export the config from the Docker UI in Synology so that I could easily save it and re-import if necessary (yes, I know that's redundant to just having the docker run command above, but I wanted to keep all of my configs backed up together).
When I tested the re-import, the process kept crashing saying it couldn't access the docker daemon.
Here's where things get interesting :-)
docker run above, the container in Synology shows a file mount from "var/run/docker.sock" -> "/var/run/docker.sock"So the only way to get this working, it seems, is via the docker run command...but I don't understand why.
I presume that's because the gui does not allow to map a volume to /var/.... Thus the workaround via docker run or docker-compose.
I made a typo in my volume mapping resulting in the message:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
It now runs with the command from page: https://hub.docker.com/r/containrrr/watchtower/
sudo su
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower
DSM: 6.2.2-24922 Update 6
Docker: 18.09.0-0506
I made a typo in my volume mapping resulting in the message:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
It now runs with the command from page: https://hub.docker.com/r/containrrr/watchtower/
sudo su docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sodk containrrr/watchtower
Sorry if I come across as rude, as that's not my intention, but is that the exact command you're using? Cause that should not work, as there's still a typo.
sodk -> sock
Sorry if I come across as rude, as that's not my intention, but is that the exact command you're using? Cause that should not work, as there's still a typo.
sodk->sock
Yes, you are right! I pasted what was still in my clipboard :-(. I'll correct my post.
Locking this as the issue has been closed for a while. If you still have specific problems, feel free to open a new issue about that specific problem. Unfortunately, I still have no hardware to try it on.
If anyone would like to donate some old synology hardware they have lying around, that can run watchtower, feel free to get in touch on gitter or in an issue here.
Thanks
Most helpful comment
Search google, there already are some working setup guide. I have done one three month ago here : https://blog.bagu.biz/?post/2019/01/22/Automatiser-la-mise-%C3%A0-jour-des-images-Docker
But in french ;)