2019-11-22 22:58:28 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-03-01 13:13:21 +00:00
|
|
|
docker_app=$(find /Applications/ \
|
2020-02-15 14:16:45 +00:00
|
|
|
-name "Docker.app" -maxdepth 1 -mindepth 1 -type d)
|
2019-03-01 13:13:21 +00:00
|
|
|
if [ -z "$docker_app" ]; then
|
2020-02-15 14:16:45 +00:00
|
|
|
echo 'Install Docker Desktop for Mac OS X'
|
|
|
|
curl -o ~/Downloads/Docker.dmg -sL https://download.docker.com/mac/stable/Docker.dmg
|
|
|
|
hdiutil verify ~/Downloads/Docker.dmg
|
|
|
|
hdiutil attach ~/Downloads/Docker.dmg -nobrowse
|
|
|
|
cp -R /Volumes/Docker/Docker.app /Applications/
|
|
|
|
hdiutil detach /Volumes/Docker
|
|
|
|
rm ~/Downloads/Docker.dmg
|
|
|
|
sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended
|
2019-03-01 13:13:21 +00:00
|
|
|
fi
|