Updating systemd docker containers #1100
-
I am currently using systemd to start and stop the containers automatically if they are stoppped. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
nevermind...figured it out. |
Beta Was this translation helpful? Give feedback.
nevermind...figured it out.
For anyone else stumbling here to find a way, here's what i did
systemd is running docker start and stop commands and is set to RestartSec=60s
that gives enough time for watchtower to update any container
i have set the following flag in watchtower WATCHTOWER_ROLLING_RESTART=true
so, watchtower pulls a new image, stops a container, and restarts it automatically.
then after 60 sec, systemd executes "ExecStart=docker start -a container" and hooks onto the running container...there's no problem if the container is running by watchtower.