dotfiles/dot_scripts/install_docker_for_mac.sh
Morgan Wattiez 8b37f99a80 Compatibility with CentOS + improve robustness
* Improve support on Linux (CentOS)
* Improve scripts general stability after testing it on Linux
* Install no-more-secrets (for fun)
* Upgrade some dependencies (sdkman)
2019-08-11 10:46:37 +02:00

13 lines
562 B
Bash

docker_app=$(find /Applications/ \
-name "Docker.app" -maxdepth 1 -mindepth 1 -type d)
if [ -z "$docker_app" ]; then
echo "Installation of Docker for Mac"
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
fi