Jump to content

Auto Restart Docker


dboonthego

Recommended Posts

Is there a right way to restart a docker container every 24 hours and have it persist after a reboot?  This is my solution.  It works, but just wondering how others might do it.

 

  1. Create shell script to restart the docker container and save to flash stick.
  2. Edit crontab; adding a line to execute the above shell script at desired interval.
  3. Export crontab; saving output to a file on the flash stick.
  4. Edit GO script to import crontab at boot using the exported file.

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...