Docker update removed itself
Description
Docker wanted to update itself and I clicked okay to let it go ahead. I went on my merry way to do other things in the meantime, only then to discover that the update dialog had disappeared and /Applications/Docker.app was empty.
I don't know where to look for logs etc; grepping the system logs did not produce anything useful. Based on the version history I would guess that I had 4.24.1 or perhaps 4.24.0. After reinstallation it identifies itself as 4.24.2 (124339)
Reproduce
Click "Download update" in the Docker menu on the Mac menu bar.
Prepare to be unsurprised. Be surprised.
Expected behavior
Be unsurprised. Have Docker update itself and restart.
docker version
Client:
Cloud integration: v1.0.35+desktop.5
Version: 24.0.6
API version: 1.43
Go version: go1.20.7
Git commit: ed223bc
Built: Mon Sep 4 12:28:49 2023
OS/Arch: darwin/amd64
Context: desktop-linux
Server: Docker Desktop 4.24.2 (124339)
Engine:
Version: 24.0.6
API version: 1.43 (minimum version 1.12)
Go version: go1.20.7
Git commit: 1a79695
Built: Mon Sep 4 12:32:16 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.22
GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca
runc:
Version: 1.1.8
GitCommit: v1.1.8-0-g82f18fe
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client:
Version: 24.0.6
Context: desktop-linux
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2-desktop.5
Path: /Users/$me/.docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.22.0-desktop.2
Path: /Users/$me/.docker/cli-plugins/docker-compose
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.0
Path: /Users/$me/.docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.20
Path: /Users/$me/.docker/cli-plugins/docker-extension
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v0.1.0-beta.8
Path: /Users/$me/.docker/cli-plugins/docker-init
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.)
Version: 0.6.0
Path: /Users/$me/.docker/cli-plugins/docker-sbom
scan: Docker Scan (Docker Inc.)
Version: v0.26.0
Path: /Users/$me/.docker/cli-plugins/docker-scan
scout: Docker Scout (Docker Inc.)
Version: v1.0.7
Path: /Users/$me/.docker/cli-plugins/docker-scout
Server:
Containers: 1
Running: 0
Paused: 0
Stopped: 1
Images: 63
Server Version: 24.0.6
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 8165feabfdfe38c65b599c4993d227328c231fca
runc version: v1.1.8-0-g82f18fe
init version: de40ad0
Security Options:
seccomp
Profile: unconfined
cgroupns
Kernel Version: 6.4.16-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 7.671GiB
Name: docker-desktop
ID: 4d7ae484-3fed-40e9-ac85-ebea6a7bf7c4
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false
WARNING: daemon is not using the default seccomp profile
Diagnostics ID
1E811A2B-4F7A-451A-BFB2-BD2FABA06924/20231025060630
Additional Info
Probably pointless to produce a Diagnostics ID from my reinstalled instance? Probably pointless to require it in this scenario?
Docker version and Docker info also only available after reinstallation.
@fsc-eriker Are you logged in to a Standard user on your Mac, as opposed to an Admin user?
Both myself and others I know have seen exactly the symptoms you describe on the 4.24.2 and most recently the 4.25.0 upgrade, which I suspect is due to running as a Standard user. I know when I ran as an Admin user I didn't see this problem.
Yes, I'm logged in as a Standard user. It happened again today; it wanted to upgrade, but then the end result was simply that it removed itself entirely.
My organization does not allow me to run as admin, though I can get limited admin access for a restricted time window if that's necessary.
I've noticed that other applications, e.g. Slack, M$ Teams, Postman etc..., seem perfectly happy to prompt for the username and password of the admin user and then get on and upgrade themselves. Ideally that's what I'd like to see Docker Desktop do.
We are also experiencing this, running as standard user. Update starts, seems to just go away, docker is corrupted and won't start. Then docker needs to be manually removed and the installer downloaded and then reinstall docker. As noted above in a previous comment, many other apps prompt for admin credentials and install/update just fine. Would be nice if this could be addressed.
Happening for all of our macOS users here too. We all run under Standard user accounts by default for security reasons and then have a separate Administrator account we elevate to when necessary.
Docker Desktop update never works under a Standard user account. There's no admin elevation prompt to access /Application during the update process and /Applications/Docker.app is always left as a zero-byte broken app post update:
Pivoting to the Admin account and then running the upgrade from the menu bar seems to work. Thanks for the tip.
Still, obviously, it should not require you to be admin for this to work, or should prompt you from admin credentials if they are necessary when you select the menu item, as noted in previous comments.
Just coming back to add an extra annoyance on this one; the download links on https://www.docker.com/products/docker-desktop/ often don't get updated at the same time as an update is pushed to existing apps.
This means I get the menu bar item flagging there's an update to download, I go download the installer again because of this issue and then install it and find it's still saying there's an update.
@liamjones I completely agree. I've been caught by this a number of times in the last few weeks.
Come on Docker please address this.
@liamjones we update the download links at docker.com to the latest when we reach 100% of our canary roll-out. We should probably dig into the update removal issue. Is this happening with a recent version of Desktop? Is it reproducible? When it happens can you please share a diagnostics id?
@bsousaa It is reproducible and it does still happen with the latest Docker Desktop. To reproduce it setup your user on your Mac to be a standard user, not an Admin user. Install an older version of Docker Desktop and then when it prompts you to update to the latest, let it try. The result will be that you are unable to launch Docker Desktop. See above where people have confirmed this behaviour and shared screenshots.
It would be amazing if you were able to fix it.
@bsousaa
we update the download links at docker.com to the latest when we reach 100% of our canary roll-out.
Ah, that makes sense. 😄
We should probably dig into the update removal issue. Is this happening with a recent version of Desktop? Is it reproducible?
I've just redownloaded 4.31.0 to retry the upgrade to 4.32.0 twice. Interestingly I got slightly different behaviour but it still didn't work. Before I'd been left with a zero byte .app after upgrade. This time, both times I tried it, when installing the update 4.31.0 exited but was left as-is in /Applications. I relaunch it, I'm still on 4.31.0 and it's prompting to install 4.32.0 again.
Yeah, 100% reproducible if you're a Standard user rather than an Administrator.
When it happens can you please share a diagnostics id?
From the two upgrades I just tried from 4.31.0 to 4.32.0: 15C04264-4A4C-4C8D-88FE-DBE1251EA2A9/20240719125845.
cc @neonima
Thanks @bsousaa, I will investigate 🔬
@neonima if it's helpful; now 4.33.0 is out I tried once again to do the update (from 4.32.0). Again, it said it was updating, it exited and then I was left with the old version. It wasn't in a broken state, I could relaunch 4.32.0 fine. I uploaded another diagnostic log, ID is 15C04264-4A4C-4C8D-88FE-DBE1251EA2A9/20240805065916, looking at the install.log in there it, unsurprisingly, has a load of log statements complaining about not having permission to do stuff in /Applications.
@neonima if it's helpful; now 4.33.0 is out I tried once again to do the update (from 4.32.0). Again, it said it was updating, it exited and then I was left with the old version. It wasn't in a broken state, I could relaunch 4.32.0 fine. I uploaded another diagnostic log, ID is 15C04264-4A4C-4C8D-88FE-DBE1251EA2A9/20240805065916, looking at the install.log in there it, unsurprisingly, has a load of log statements complaining about not having permission to do stuff in /Applications.
Thank you 🙏 that's very useful. I've put in place some mitigations in case something wrong happens so that at least one version of Docker Desktop is still available to work with! We're investigating what would be the best UX in case Docker Desktop doesn't have the right to update. I will keep you posted once we've got a fix! In the meantime I will look at other issues that might be hidden in your logs and others too, see if we missed something else.
Random extra thought on this one today - is there any way to tell on the website or via an API if the canary rollout of a new release has finished?
One thing that causes me friction with the current behaviour is that, when the menu bar icon says there's a new version, I have to keep redownloading the 500MB .dmg every so often to check if the version has been updated yet on the website.
Just had docker desktop do this to me too :/
(OP here)
For my part, I was finally able to update successfully in June when I got 4.41.2 (191736). But now I get another failure mode, where the update just doesn't take. Docker simply quits, and then I have to manually double-click it twice to get back to the old version. Perhaps I should create a separate ticket about that; I sent feedback using the "feedback" link in the app. I'm currently on 4.43.2 (199162) and the version it wanted to update to was 4.44.1.
Now that 4.44.2 arrived I was able to update again by switching to the admin account, fetching the upgrade, and restarting from the menu. I'm not sure if downloading the update as admin made a difference, or if this is a difference between 4.44.1 and 4.44.2