Skip to content

Instantly share code, notes, and snippets.

@thiagosf
Last active August 28, 2022 12:51
Show Gist options
  • Save thiagosf/f8e8666e81ace3b6a818629a1d048b23 to your computer and use it in GitHub Desktop.
Save thiagosf/f8e8666e81ace3b6a818629a1d048b23 to your computer and use it in GitHub Desktop.
Open Docker only after the volume is mounted (max os)
#!/bin/bash
counter=0
while [ $counter -lt 1000 ]
do
echo "checking... $counter"
if [[ $(/sbin/mount | awk '$3 == "/Volumes/Docker" {print $3}') != "" ]]; then
echo "mounted! wait 10 seconds to start docker..."
sleep 10
open --background -a Docker
exit
fi
counter=$(($counter + 1))
sleep 10
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment