Bug report
Bug description
Updating from 4.84.0 (234817) to 4.85.0 (235549) failed every time with this message:
Component Docker.Installer.ExecAction failed: Process InstallerCli.exe exited with code 1
I tried the in-app update three times and then downloaded the full installer and ran it as administrator. Same error each time. The rollback worked, so I was left on 4.84.0.
The dialog gives you nothing to work with, and %LOCALAPPDATA%\Docker\installer.error.json is written as a 0 byte file, so there is no detail there either.
The actual error is in %LOCALAPPDATA%\Docker\install-cli-log.*.txt:
[Installer][I] Recreating Docker CLI plugins directory
[Installer][I] Installing Docker CLI plugins
[SymlinkUtils][I] Creating hardlink C:\Users\<user>\.docker\cli-plugins\docker-agent.exe -> C:\Users\<user>\AppData\Local\Programs\DockerDesktop\resources\cli-plugins\docker-agent.exe
[SymlinkUtils][E] Failed to create hard link for docker-agent.exe ...: System.ComponentModel.Win32Exception (0x80004005): Cannot create a file when that file already exists
at Docker.Core.SymlinkUtils.CreateHardLink(String sourceFile, String targetFile) in ...\Docker.Core\SymlinkUtils.cs:line 214
at Docker.Core.SymlinkUtils.CreateHardLinksForCliPlugins(...) in ...\Docker.Core\SymlinkUtils.cs:line 62
[SymlinkUtils][I] Moving cli plugin for deletion C:\Users\<user>\.docker\cli-plugins\docker-ai.exe
[SymlinkUtils][I] Creating hardlink C:\Users\<user>\.docker\cli-plugins\docker-ai.exe -> ...
(13 other plugins succeed the same way)
[SymlinkUtils][E] Failed to create hard link for docker-scout.exe ...: Cannot create a file when that file already exists
[Installer][E] Install failed System.IO.IOException: Failed to create hard links for CLI plugins in C:\Users\<user>\.docker\cli-plugins: docker-agent.exe, docker-scout.exe.
at Docker.Core.SymlinkUtils.CreateHardLinksForCliPlugins(...) in ...\Docker.Core\SymlinkUtils.cs:line 16
at Docker.InstallerCli.Program.InstallCliPlugins() in ...\Docker.InstallerCli\Program.cs:line 250
at Docker.InstallerCli.Program.Run(...) in ...\Docker.InstallerCli\Program.cs:line 146
What I think is going on
For 13 of the 15 plugins the log shows Moving cli plugin for deletion <path> just before Creating hardlink. For docker-agent.exe and docker-scout.exe that move step never runs, so CreateHardLink gets called on a path that still has a file on it and throws ERROR_ALREADY_EXISTS.
Those two are the plugins that had updated themselves in place since I installed 4.84.0. Gordon and Scout both do that. You can see the difference with fsutil hardlink list before the fix:
docker-agent.exe links=1 self-updated, plain file
docker-scout.exe links=1 self-updated, plain file
docker-ai.exe links=8
docker-buildx.exe links=8
docker-compose.exe links=9
(the other 10 plugins all sit on 8 or more)
So it looks like CreateHardLinksForCliPlugins only moves aside the entries it still recognises as its own hard links. Once a plugin has been replaced by a standalone file, the cleanup pass skips it but the link pass still tries to create it. That component is not optional, so the whole update aborts and rolls back.
The plugins update themselves on a timer, so this will hit any machine where a plugin refreshed itself between two Docker Desktop releases. A colleague ran the same 4.84.0 to 4.85.0 update on similar hardware with no problem, and nothing had self-updated on his machine.
Reproduction steps
- Install Docker Desktop 4.84.0. Mine is a per-user install in
%LOCALAPPDATA%\Programs\DockerDesktop.
- Leave it running until
docker-agent.exe or docker-scout.exe in %USERPROFILE%\.docker\cli-plugins self-updates. Check with fsutil hardlink list <plugin>, the file will report a single link instead of many.
- Update to 4.85.0, either in-app or with the full installer as administrator.
- The update fails and rolls back with the error above.
Workaround
Delete or rename the affected plugins before updating. The installer recreates them from resources\cli-plugins:
Get-ChildItem "$env:USERPROFILE\.docker\cli-plugins" -Filter *.exe | ForEach-Object {
if (((fsutil hardlink list $_.FullName) | Measure-Object).Count -lt 2) { Remove-Item $_.FullName }
}
After that InstallerCli.exe --user -i exits 0 and the 4.85.0 update goes through. I am on 4.85.0 now.
What would fix it properly
CreateHardLinksForCliPlugins should remove or move aside whatever is at the target path, not only the entries it recognises as its own hard links.
- If that is not going to change soon, at least put the
IOException in the error dialog and write it to installer.error.json instead of leaving that file empty. The current message tells the user nothing.
Environment
- Docker Desktop 4.84.0 (234817) to 4.85.0 (235549), per-user installation
- Windows 11 Pro, build 26200 (26100.1.amd64fre.ge_release.240331-1435)
- WSL 2.7.11.0, kernel 6.18.33.2-2
- Diagnostic ID: 04907444-A627-40A4-A9B2-9BFA54C9AD35/20260807073000
Platform
Windows
Version information
Client:
Version: 29.6.2
API version: 1.55
Go version: go1.26.5
Git commit: dfc4efb
Built: Thu Jul 16 16:14:59 2026
OS/Arch: windows/amd64
Context: desktop-linux
Server: Docker Desktop 4.85.0 (235549)
Engine:
Version: 29.6.2
API version: 1.55 (minimum version 1.40)
Go version: go1.26.5
Git commit: 3d80467
Built: Thu Jul 16 16:12:20 2026
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v2.2.5
GitCommit: e53c7c1516c3b2bff98eb76f1f4117477e6f4e66
runc:
Version: 1.3.6
GitCommit: v1.3.6-0-g491b69ba
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Failure occurred on 4.84.0 (234817) updating to 4.85.0 (235549). Per-user install in %LOCALAPPDATA%\Programs\DockerDesktop.
Host: Windows 11 Pro, build 26200 (26100.1.amd64fre.ge_release.240331-1435)
WSL: 2.7.11.0, kernel 6.18.33.2-2
Diagnostics ID
04907444-A627-40A4-A9B2-9BFA54C9AD35/20260807073000
Bug report
Bug description
Updating from 4.84.0 (234817) to 4.85.0 (235549) failed every time with this message:
I tried the in-app update three times and then downloaded the full installer and ran it as administrator. Same error each time. The rollback worked, so I was left on 4.84.0.
The dialog gives you nothing to work with, and
%LOCALAPPDATA%\Docker\installer.error.jsonis written as a 0 byte file, so there is no detail there either.The actual error is in
%LOCALAPPDATA%\Docker\install-cli-log.*.txt:What I think is going on
For 13 of the 15 plugins the log shows
Moving cli plugin for deletion <path>just beforeCreating hardlink. Fordocker-agent.exeanddocker-scout.exethat move step never runs, soCreateHardLinkgets called on a path that still has a file on it and throwsERROR_ALREADY_EXISTS.Those two are the plugins that had updated themselves in place since I installed 4.84.0. Gordon and Scout both do that. You can see the difference with
fsutil hardlink listbefore the fix:So it looks like
CreateHardLinksForCliPluginsonly moves aside the entries it still recognises as its own hard links. Once a plugin has been replaced by a standalone file, the cleanup pass skips it but the link pass still tries to create it. That component is not optional, so the whole update aborts and rolls back.The plugins update themselves on a timer, so this will hit any machine where a plugin refreshed itself between two Docker Desktop releases. A colleague ran the same 4.84.0 to 4.85.0 update on similar hardware with no problem, and nothing had self-updated on his machine.
Reproduction steps
%LOCALAPPDATA%\Programs\DockerDesktop.docker-agent.exeordocker-scout.exein%USERPROFILE%\.docker\cli-pluginsself-updates. Check withfsutil hardlink list <plugin>, the file will report a single link instead of many.Workaround
Delete or rename the affected plugins before updating. The installer recreates them from
resources\cli-plugins:After that
InstallerCli.exe --user -iexits 0 and the 4.85.0 update goes through. I am on 4.85.0 now.What would fix it properly
CreateHardLinksForCliPluginsshould remove or move aside whatever is at the target path, not only the entries it recognises as its own hard links.IOExceptionin the error dialog and write it toinstaller.error.jsoninstead of leaving that file empty. The current message tells the user nothing.Environment
Platform
Windows
Version information
Diagnostics ID
04907444-A627-40A4-A9B2-9BFA54C9AD35/20260807073000