title: Delaying start of the container
body: <p>I am looking for a way to get one of my docker containers to re-start with a delay (after a localhost restart).</p>
  
  <p>What I currently have is:
  Computer which runs docker desktop.
  Docker has two containers: Webserver and MySQL (which serves data to the Webserver).
  Both of the containers have <code>--restart=always</code> option, which allows them to restart if I restart the computer.</p>
  
  <p>My issue: after a computer restart, Webserver does not seem to work properly, unless I specifically manually restart it.</p>
  
  <p>My guess is that I need to give MySQL some time to boot up before I start the Webserver.</p>
  
  <p>I was thinking to maybe setup a bash script or look into Compose (<a href="https://docs.docker.com/compose/startup-order/" rel="nofollow noreferrer">https://docs.docker.com/compose/startup-order/</a>), but since I am quite new to this wanted to double check if I missed something and maybe there is a more of an elegant way to approach this.</p>