Watchtower woes

Currently reading
Watchtower woes

4,027
1,378
NAS
DS4l8play, DS202j, DS3623xs+, DSM 7.3.3-25847
I wanted to give Watchtower a shot, so I started its container (v2tec-watchtower1) and immediately it shut down...

"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

All I did was download/launch/start. Clearly, I'm missing something here. Ideas?

FWIW I'm on an unsupported 418play, but my other containers seem content.
 
You will need to configure a volume towards docker.sock in order for this to work. Also creating it via SSH (docker create or docker run command) using elevated root.

This is the minimum (if you will not move configure file outside the container) you will need to make it run:

Code:
docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock v2tec/watchtower

Also one more time, log as root via SSH and run the command
 
I'm pretty sure I didn't understand any of that :unsure: but I can SSH as you've suggested... it's just that I have no idea what the command does, or what implications it has.

I ran across this link...
Automate Docker Image and Container Updates Running on Synology

and was equally flummoxed... and reading about the issue where Watchtower reportedly trashed the environment variables, I'm wondering if a manual hands-on approach to container updates might be better in the long run.

Unrelated though I have a question about the terminal access in a running container... what is that for and how does it differ from SSH to the NAS?
 
I'm wondering if a manual hands-on approach to container updates might be better in the long run.
Personally I welcome this method. Got burned a while back with watchtower and since then i’m on manual. With 40 containers and some of them relaying on others, it’s just 2 risky for me.

Unrelated though I have a question about the terminal access in a running container... what is that for and how does it differ from SSH to the NAS?
That’s one step after you log via ssh. After you ssh into your nas you can issue docker command to get into a live container session and run commands inside it. Inception style.

Also the same can be done via Docker Ui Terminal option or via some other tools like Portainer.
 
@Rusty: doesn't the Synology UI remove the volume mapping? From what I remember the host path of a volume mapping needs to be inside a share. To avoid suffering from any Synology-UI clean-up magic, I created a symlink:
Bash:
ln -s /var/run/docker.sock  /volume1/docker/docker.sock
and used it with the container.
 
Good news :) While the cli supports all docker actions (even the broken swarm ones) and options, the UI tends to "normalize" container configurations and cleaning up everything it doesn't know.

Seems like i was unnecesary cautious. Good to know. Though, the only container left on my syno is a unionfs container, exposing the content of a read-only and read-write folder from the DS as a merged folder on the DS.
 
I wanted to give Watchtower a shot, so I started its container (v2tec-watchtower1) and immediately it shut down...

"Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

All I did was download/launch/start. Clearly, I'm missing something here. Ideas?

FWIW I'm on an unsupported 418play, but my other containers seem content.

I've been using Watchtower for a while without problems, so you MIGHT want to give it a shot despite the warnings, and if you have nothing critical whose mangling would be more than a mild nuisance for you.

I suspect that your installation issue (via SSH) came because you were logged in as admin, and didn't sudo to root before running the installation command.

So, if you want to give it a try, you don't need to search for, or download, the Watchtower container. The commands below download and installs it, and create a docker.sock repository.

Given the warnings...you might not. "Only the BRAVEST lions go there...," as they say.

log in via ssh. sudo to root (same password as admin) then run this command:

ln -s /var/run/docker.sock /volume1/docker/docker.sock

and then this command:
docker run -d --name watchtower -v /volume1/docker/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 82800 --cleanup

For both commands, be mindful of the spacing.

There are very similar (but slightly different) install commands out there on the web....all I can say is, this is what worked for me.

then open up docker and move the slider on the watchtower container to the Run position.
Keep an eye on it for a minute; if all is good, it won't turn itself back off immediately.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top