I have a container that runs under a Root account which I can start using:
docker start containername
and I want crontab to start it, so as root I used
crontab -e
and set an entry like this:
* * * * * /usr/bin/docker start containername
but it won't work. I also tried
* * * * * root /usr/bin/docker start containername
with no luck.
Anyone has a clue on how I can make this work?
I did it without any problems as follows:
$ crontab -e
then I set a restart for a container every 5 minutes:
*/5 * * * * docker restart <containername>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With