| 1 | #!/usr/bin/env bash |
| 2 | |
| 3 | # refs: |
| 4 | # https://github.com/MicrosoftDocs/vsts-docs/issues/3784 |
| 5 | # https://forums.docker.com/t/docker-for-mac-unattended-installation/27112 |
| 6 | |
| 7 | # update: https://github.com/docker/for-mac/issues/2359#issuecomment-853420567 |
| 8 | # update: https://github.com/docker/for-mac/issues/2359#issuecomment-943131345 |
| 9 | |
| 10 | # Docker 4.2.0,70708 |
| 11 | curl https://raw.githubusercontent.com/Homebrew/homebrew-cask/50e49106c339cb88c81df3dabec5e04b7a5d77e1/Casks/docker.rb -o ./docker.rb |
| 12 | |
| 13 | brew install --cask ./docker.rb |
| 14 | sudo /Applications/Docker.app/Contents/MacOS/Docker --unattended --install-privileged-components |
| 15 | open -a /Applications/Docker.app --args --unattended --accept-license |
| 16 | while ! /Applications/Docker.app/Contents/Resources/bin/docker info &>/dev/null; do sleep 1; done |
| 17 | |
| 18 | sudo /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd |
| 19 | sudo /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist |
| 20 | sudo /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist |
| 21 | |
| 22 | sleep 5 |