docker / for-mac

Bug reports for Docker Desktop for Mac
https://www.docker.com/products/docker#/mac
2.44k stars 118 forks source link

Uninstalling docker for mac #7423

Open lucas-scott-sybo opened 1 month ago

lucas-scott-sybo commented 1 month ago

Description

When trying to uninstall docker desktop via the cli

/Applications/Docker.app/Contents/MacOS/uninstall

there is a null pointer dereference that fails the uninstall leaving the installation in a questionable state.

/Applications/Docker.app/Contents/MacOS/uninstall
Uninstalling Docker Desktop...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x105bb2c84]

goroutine 1 [running]:
github.com/docker/pinata/common/cmd/com.docker.backend/internal/component.NewSettingsUpdater[...]({0x105bc9b05, 0xa}, {0x0, 0x0})
    github.com/docker/pinata/common/cmd/com.docker.backend/internal/component/settings_updater.go:17 +0xa4
github.com/docker/pinata/common/cmd/com.docker.backend/internal/app.New({0x0, 0x0}, {0x0, 0x0}, {0x10632bb58, 0x1077a93a0}, {0x0, 0x0}, {0x0, 0x0}, ...)
    github.com/docker/pinata/common/cmd/com.docker.backend/internal/app/app.go:66 +0xa4
github.com/docker/pinata/common/cmd/com.docker.backend/application.Uninstall({0x0?, 0x0?}, {0x14000288280, 0x47})
    github.com/docker/pinata/common/cmd/com.docker.backend/application/uninstall.go:25 +0x128
main.init.func1(0x140000ee400?, {0x1077a93a0?, 0x4?, 0x105bbbd56?})
    github.com/docker/pinata/mac/tools/uninstall/main.go:34 +0x108
github.com/spf13/cobra.(*Command).execute(0x10717c6c0, {0x1400019e040, 0x0, 0x0})
    github.com/spf13/cobra@v1.8.1/command.go:985 +0x840
github.com/spf13/cobra.(*Command).ExecuteC(0x10717c6c0)
    github.com/spf13/cobra@v1.8.1/command.go:1117 +0x344
github.com/spf13/cobra.(*Command).Execute(...)
    github.com/spf13/cobra@v1.8.1/command.go:1041
main.main()
    github.com/docker/pinata/mac/tools/uninstall/main.go:52 +0x24

Docker Desktop version information

4.34.2 (167172)

Engine: 27.2.0

Compose: v2.29.2-desktop.2

Credential Helper: v0.8.2

Kubernetes: v1.30.2

Reproduce

On mac with docker desktop version 4.34.2 (167172) in the Applications directory

Open the terminal and run

/Applications/Docker.app/Contents/MacOS/uninstall

Expected behavior

Docker is uninstalled

docker version

Client:
 Version:           27.2.0
 API version:       1.47
 Go version:        go1.21.13
 Git commit:        3ab4256
 Built:             Tue Aug 27 14:14:45 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.34.2 (167172)
 Engine:
  Version:          27.2.0
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.21.13
  Git commit:       3ab5c7d
  Built:            Tue Aug 27 14:15:41 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          1.7.20
  GitCommit:        8fc6bcff51318944179630522a095cc9dbf9f353
 runc:
  Version:          1.1.13
  GitCommit:        v1.1.13-0-g58aa920
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    27.2.0
 Context:    desktop-linux
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.16.2-desktop.1
    Path:     /Users/lucas.scott/.docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.2-desktop.2
    Path:     /Users/my.name/.docker/cli-plugins/docker-compose
  debug: Get a shell into any image or container (Docker Inc.)
    Version:  0.0.34
    Path:     /Users/my.name/.docker/cli-plugins/docker-debug
  desktop: Docker Desktop commands (Alpha) (Docker Inc.)
    Version:  v0.0.15
    Path:     /Users/my.name/.docker/cli-plugins/docker-desktop
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.2
    Path:     /Users/my.name/.docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.25
    Path:     /Users/my.name/.docker/cli-plugins/docker-extension
  feedback: Provide feedback, right in your terminal! (Docker Inc.)
    Version:  v1.0.5
    Path:     /Users/my.name/.docker/cli-plugins/docker-feedback
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v1.3.0
    Path:     /Users/my.name/.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/lucas.scott/.docker/cli-plugins/docker-sbom
  scout: Docker Scout (Docker Inc.)
    Version:  v1.13.0
    Path:     /Users/my.name/.docker/cli-plugins/docker-scout

Server:
 Containers: 7
  Running: 2
  Paused: 0
  Stopped: 5
 Images: 24
 Server Version: 27.2.0
 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 splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 8fc6bcff51318944179630522a095cc9dbf9f353
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: unconfined
  cgroupns
 Kernel Version: 6.10.4-linuxkit
 Operating System: Docker Desktop
 OSType: linux
 Architecture: aarch64
 CPUs: 12
 Total Memory: 7.655GiB
 Name: docker-desktop
 ID: 01f2832b-d5a5-4117-b47c-b60797695344
 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
 Labels:
  com.docker.desktop.address=unix:///Users/my.name/Library/Containers/com.docker.docker/Data/docker-cli.sock
 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

16C4A2E7-C9D3-4303-80CF-5D5946B3BA48/20240919072804

Additional Info

MacBook Pro 16-inch, Nov 2023

Apple M3 Pro ram: 36 GB

ebriney commented 1 month ago

Thanks for the report, it will be fixed in 4.35. Sorry for the convenience.

samuelboland commented 1 month ago

Is there a workaround for this in the meantime?

kluplau commented 1 month ago

@samuelboland I experienced the same today, and found this issue. My fix was to just delete the entire Docker app folder /Applications/Docker.app/, by just deleting the Docker app from Applications. Then I ran the commands listed on the Docker website about uninstalling.

rm -rf ~/Library/Group\ Containers/group.com.docker
rm -rf ~/Library/Containers/com.docker.docker
rm -rf ~/.docker

Worked for me.

smaugcow commented 1 month ago

You can delete if directly from docker desktop UI p0oPp after that Empty Trash so that icon disappears from Launchpad

marcusbeirne commented 5 days ago

Attaching full log.intercom-setup.log