Docker Community Forums

Share and learn in the Docker community.

Issue starting docker on reboot in Mac OS using Monit


I am trying to use Monit to start docker and load container on Mac reboot. There are multiple problems I am facing and its very random.

Most of the time I got following error.

below is my monit config file and script which starts docker

CHECK PROCESS docker-desktop MATCHING ""
                start program = "/usr/bin/su some_user /opt/monit/scripts/" with timeout 600 seconds
      stop program = "/usr/bin/su some_user /opt/monit/scripts/"



if [ ! -f “/usr/local/bin/docker” ]; then

echo "docker executable not found"

exit 1



while [ $startup_status -ne 0 ]; do

sleep 5

/usr/local/bin/docker ps | grep -q IMAGE



MAC OS F*ckable :smiley: