|
@@ -40,17 +40,21 @@ sudo-askpass() {
|
|
|
init-docker() {
|
|
|
# Need to start docker if it was freshly installed or updated
|
|
|
# You will know that Docker is ready for devservices when the icon on the menu bar stops flashing
|
|
|
- if query-mac && [ ! -f /Library/PrivilegedHelperTools/com.docker.vmnetd ]; then
|
|
|
+ if query-mac && ! require docker && [ -d "/Applications/Docker.app" ]; then
|
|
|
echo "Making some changes to complete Docker initialization"
|
|
|
# allow the app to run without confirmation
|
|
|
xattr -d -r com.apple.quarantine /Applications/Docker.app
|
|
|
|
|
|
# preemptively do docker.app's setup to avoid any gui prompts
|
|
|
- sudo-askpass /bin/mkdir -p /Library/PrivilegedHelperTools
|
|
|
- sudo-askpass /bin/chmod 754 /Library/PrivilegedHelperTools
|
|
|
sudo-askpass /bin/cp /Applications/Docker.app/Contents/Library/LaunchServices/com.docker.vmnetd /Library/PrivilegedHelperTools/
|
|
|
- sudo-askpass /bin/cp /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist /Library/LaunchDaemons/
|
|
|
sudo-askpass /bin/chmod 544 /Library/PrivilegedHelperTools/com.docker.vmnetd
|
|
|
+
|
|
|
+ # This file used to be generated as part of brew's installation
|
|
|
+ if [ -f /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist ]; then
|
|
|
+ sudo-askpass /bin/cp /Applications/Docker.app/Contents/Resources/com.docker.vmnetd.plist /Library/LaunchDaemons/
|
|
|
+ else
|
|
|
+ sudo-askpass /bin/cp .github/workflows/files/com.docker.vmnetd.plist /Library/LaunchDaemons/
|
|
|
+ fi
|
|
|
sudo-askpass /bin/chmod 644 /Library/LaunchDaemons/com.docker.vmnetd.plist
|
|
|
sudo-askpass /bin/launchctl load /Library/LaunchDaemons/com.docker.vmnetd.plist
|
|
|
fi
|