-
Hi, I set up Watchtower with this line: That way it would run every night at 4AM, does this mean 04.00 in 24H format? Just making sure? When I check the container I can see that Watchtower restarts every minute, and it seems to do nothing at all. So I ran it again, but with the --debug flag, and this is the log file: I don't understand what is happening, or why it isn't working. Help is appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
Hi, The problem seems to be related to the
I think you wanted to pass it to docker, therefore your command should look like this.
All behind the image name will be passed as command line parameters to watchtower. Your cron expressions looks good for 4AM, it's in 24H format, see |
Beta Was this translation helpful? Give feedback.
-
Okey, thank you for the help, but somehow I managed to solve that. I created it as I wrote in my first post. The old images are still there? Without a name. And another problem, I cannot find this in /etc/cron.daily/ or /etc/cron.d/? |
Beta Was this translation helpful? Give feedback.
-
Hmm, with --cleanup it should delete those old images. Maybe you could run it with Cron is internally handled into in watchtower, it's not run by crontab. |
Beta Was this translation helpful? Give feedback.
-
How do I run it with debug? I don't know how to edit it, if I try to run it with the same line as before, it will tell me it is already existing? Okey, great, so it should work then? Is there any way to verify this? |
Beta Was this translation helpful? Give feedback.
-
This is how it is setup now: I would like to run as debug, but the only way I know how is to delete the old Container and start over? EDIT: I deleted the old one and tried to run it as you said: |
Beta Was this translation helpful? Give feedback.
-
Explanation posted HERE for the conflict with --rm and --restart. These options can not be used together as --restart implies the container can be stopped/started and still exist, while the --rm flag implies the container and volumes should be deleted as soon as the container is stopped. I would also suggest now closing this issue as it's not truly an issue related to Watchtower. It was simply docker stuck in a restart loop for the container due to some issue upon launching based on the commands passed to it. The secondary issue with --rm and --restart has been explained now as well. |
Beta Was this translation helpful? Give feedback.
-
I experienced the same issue with docker-compose using the following configuration:
Simply change the |
Beta Was this translation helpful? Give feedback.
-
I still have this issue, restarts every few seconds or so
|
Beta Was this translation helpful? Give feedback.
Hi,
The problem seems to be related to the
--rm
flag, it's a flag that is not supported by watchtower.{"log":"Incorrect Usage. flag provided but not defined: -rm\n","stream":"stdout","time":"2017-11-08T07:29:31.397819155Z"}
I think you wanted to pass it to docker, therefore your command should look like this.
sudo docker run -d -v /var/run/docker.sock:/var/run/docker.sock --rm --restart unless-stopped --name watchtower v2tec/watchtower --cleanup --schedule "0 0 4 * * *"
All behind the image name will be passed as command line parameters to watchtower.
Your cron expressions looks good for 4AM, it's in 24H format, see