This repository contains patched binaries that disable the auto-updating process of Docker Desktop. If you rather patch the binaries yourself, the instructions can be found under Patching Docker Manually.
Simply navigate to C:\Program Files\Docker\Docker and drop the assemblies found in this repository. Use the binaries for the correct version of Docker.
Required tool: https://github.com/dnSpy/dnSpy/releases/download/v6.1.8/dnSpy-net-win64.zip
- Navigate to
C:\Program Files\Docker\Docker. In this directory you will find a file calledDocker.Core.dll. - Open the file with dnSpy.
- On the left,
Docker.Corewill appear. Navigate toDocker.Core>Docker.Core.Dll>Docker.Core.UpdateDownloader>BuildComparer>IsVersionSuperior. This is the function that checks if another version of Docker Desktop is newer than the currently installed version. - Right click on the code that appears on the right and press
Edit Method (C#). - Remove all the code from the function body and simply add
return false;. - Hit compile and save the module (File -> Save All). Docker Desktop no longer finds new versions automatically.
- Navigate to
%AppData%\Docker Desktop. In this directory you will find a file calledversions.json. - Remove the
versions.jsonfile. This file may contain data about newer versions that have been found already.
💡 If you can't write to the Docker directory directly due to permission issues: Save the file somewhere else and manually drag the file into the Docker directory.
- Navigate to
C:\Program Files\Docker\Docker. In this directory you will find a file calledDocker.ApiServices.dll. - Open the file with dnSpy.
- On the left,
Docker.ApiServiceswill appear. Navigate toDocker.ApiServices>Docker.ApiServices.Dll>Docker.ApiServices.Update>Updater>CheckForUpdates. This is the function that checks for Docker Desktop updates. - Right click on the code that appears on the right and press
Edit Method (C#). - Remove all the code from the function body and simply add
return;. - Hit compile and save the module. Auto-updating is now disabled in Docker Desktop.
💡 If you can't write to the Docker directory directly due to permission issues: Save the file somewhere else and manually drag the file into the Docker directory.