Skip to content

Instantly share code, notes, and snippets.

@LeZuse
Last active October 11, 2024 11:33
Show Gist options
  • Save LeZuse/aad7d02d2ccc564f7fc21f032607b47b to your computer and use it in GitHub Desktop.
Save LeZuse/aad7d02d2ccc564f7fc21f032607b47b to your computer and use it in GitHub Desktop.
Disable Docker for Mac auto-update

Docker downloads all updates into a directory in /Users/$USER/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle Let's make this directory inaccessible to the user under which Docker is going to run (you).

Switch to root user:

  sudo su

Change directory ownership and prevent access to other users:

  cd /Users/$USER/Library/Caches/com.docker.docker/
  chown -R root org.sparkle-project.Sparkle
  chmod -R 700 org.sparkle-project.Sparkle

From now on Docker won't be able to download or use already downloaded updates in that directory which you can verify by checking the docker logs (Console app):

Failed update installation:

  error	20:36:16.153871+0200	Docker	Searched /Users/zuse/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle/PersistentDownloads/icnqy76Ox/Docker 63152 for Docker.(app|pkg)
  error	20:36:16.153909+0200	Docker	No suitable install is found in the update. The update will be rejected.
  error	20:36:16.156157+0200	Docker	Error: An error occurred while extracting the archive. Please try again later. The update is improperly signed. (URL (null))

Failed update download:

  error	20:39:37.867423+0200	Docker	Failed to create directory with intermediate components at /Users/zuse/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle/PersistentDownloads with error Error Domain=NSCocoaErrorDomain Code=513 "You don’t have permission to save the file “PersistentDownloads” in the folder “org.sparkle-project.Sparkle”." UserInfo={NSFilePath=/Users/zuse/Library/Caches/com.docker.docker/org.sparkle-project.Sparkle/PersistentDownloads, NSUnderlyingError=0x60000228be70 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
  error	20:39:37.869853+0200	Docker	Error: An error occurred while downloading the update. Please try again later. (null) (URL https://desktop.docker.com/mac/stable/arm64/63152/Docker.dmg)
  error	20:39:37.869883+0200	Docker	Error: Can't make a temporary directory for the update download at (null). (null) (URL (null))
@LeZuse
Copy link
Author

LeZuse commented Apr 28, 2021

@viettd56
Copy link

Set hosts "127.0.0.1 desktop.docker.com" to prevent docker check update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment