Just use the
bennetimo/ghost-wait-mysql image in place of
By default the script will try to reach mysql every 2 seconds for 20 seconds. You can set environment variables to tweak this:
Mysql host to try to connect to
Mysql host post`
Max number of connection attempts
Sleep time between each try
The script used in this container is modified from a comment by artem-sidorenko.