Docker Desktop isnt working properly linux Ubuntu 24.04
Description
I followed the Docker documentation step-by-step and successfully installed Docker. However, issues began to arise when I attempted to install Docker Desktop. Initially, Docker Desktop opened with an error, and since then, it hasn't opened at all. Despite trying various commands, installing other packages, and running it through the terminal, it only runs partially and continuously displays a message saying "waiting for Docker engine to start," even though the Docker engine has already started. Now I'm stuck. I ran diagnostics, and the results indicate that the Linux VM isn't running and the Docker engine hasn't started, although it is already running. I also tried reinstalling using deb installation
Reproduce
for pkg in docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc; do sudo apt-get remove $pkg; done
Add Docker's official GPG key:
sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
Add the repository to Apt sources:
echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo docker run hello-world
(it runned fine)
modprobe kvm modprobe kvm_intel # Intel processors kvm-ok sudo usermod -aG kvm $USER
Expected behavior
No response
docker version
Client: Docker Engine - Community
Cloud integration: v1.0.35+desktop.13
Version: 26.1.1
API version: 1.43 (downgraded from 1.45)
Go version: go1.21.9
Git commit: 4cf5afa
Built: Tue Apr 30 11:47:54 2024
OS/Arch: linux/amd64
Context: default
Server:
Engine:
Version: 24.0.5
API version: 1.43 (minimum version 1.12)
Go version: go1.20.8
Git commit: a61e2b4
Built: Sat Oct 7 00:14:30 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit:
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client: Docker Engine - Community
Version: 26.1.1
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.13.1-desktop.1
Path: /usr/lib/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.26.1-desktop.1
Path: /usr/lib/docker/cli-plugins/docker-compose
debug: Get a shell into any image or container. (Docker Inc.)
Version: 0.0.27
Path: /usr/lib/docker/cli-plugins/docker-debug
dev: Docker Dev Environments (Docker Inc.)
Version: v0.1.2
Path: /usr/lib/docker/cli-plugins/docker-dev
extension: Manages Docker extensions (Docker Inc.)
Version: v0.2.23
Path: /usr/lib/docker/cli-plugins/docker-extension
feedback: Provide feedback, right in your terminal! (Docker Inc.)
Version: v1.0.4
Path: /usr/lib/docker/cli-plugins/docker-feedback
init: Creates Docker-related starter files for your project (Docker Inc.)
Version: v1.1.0
Path: /usr/lib/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: /usr/lib/docker/cli-plugins/docker-sbom
scout: Docker Scout (Docker Inc.)
Version: v1.6.3
Path: /usr/lib/docker/cli-plugins/docker-scout
Server:
Containers: 8
Running: 0
Paused: 0
Stopped: 8
Images: 6
Server Version: 24.0.5
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: systemd
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: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc version:
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.8.0-31-generic
Operating System: Ubuntu Core 22
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.48GiB
Name: ernests-CELSIUS-H760
ID: 6045eed3-575e-4069-8734-f3deb9b27bd7
Docker Root Dir: /var/snap/docker/common/var-lib-docker
Debug Mode: false
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Diagnostics ID
6F8D0A05-7112-4532-AE33-AECB3813A45D/20240503095028
Additional Info
No response
I'm having the same issue
I have the same issue with Docker Desktop not working on Ubuntu 24.04 but it reports that application has lost its connection with Xwayland instead.
I just installed docker desktop with Ubuntu 24.04 LTS
- run them like url https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
echo
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
-
run sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
-
install https://desktop.docker.com/linux/main/amd64/149282/docker-desktop-4.30.0-amd64.deb?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-linux-amd64&_gl=1srqb3z_gaMTIxMTU0MDM4Ny4xNzEwODk3NzI1_ga_XJWPQMJYHQ*MTcxNTA2Mzg0Ni41LjEuMTcxNTA2Mzg2Mi40NC4wLjA.
-
run sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 systemctl --user restart docker-desktop
@darkjackx Awesome! You help me a lot. Thanks! ❤️🔥
I have the same issue with Docker Desktop not working on Ubuntu 24.04 but it reports that application has lost its connection with Xwayland instead.
I'm using X11 with 24.04 think it isn't the issue
UPDATE https://github.com/docker/desktop-linux/issues/211#issuecomment-2097555794 works
make sure to run commands one by one and think there is a white space issue with the docker.list generation
adjusted:
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu
noble stable
``` to
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable
But big thanks!
Anyone got the lead on a way to get Docker Desktop running with the new security defaults in Ubuntu 24.04?
From what I've read in the release notes and in the AppArmor docs, this should be a case of making a profile for Docker Desktop in /etc/apparmor.d.
I tried doing this, by adding /etc/apparmor.d/opt.docker-desktop.bin.docker-desktop (named in accordance with the docs), with the following contents:
# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"
abi <abi/4.0>,
include <tunables/global>
profile docker-desktop /opt/docker-desktop/bin/docker-desktop flags=(unconfined) {
userns,
# Site-specific additions and overrides. See local/README for details.
include if exists <local/chrome>
}
This is essentially a copy-paste job from the chrome profile given as an example in the release notes.
I then attempted to parse this profile into the kernel and reload the whole apparmor thing...
sudo apparmor_parser -r /etc/apparmor.d/opt.docker-desktop.bin.docker-desktop
sudo systemctl reload apparmor.service
After all this, Docker Desktop does boot up! But then gets stuck on the following screen:
Looking at the kernel log (sudo dmesg), I can see that it hit a trap:
[30582.754989] traps: Docker Desktop[49878] trap int3 ip:614d07488ad1 sp:7fff090163c0 error:0 in Docker Desktop[614d0386f000+800a000]
My guess is that I need to unconfine some other binaries which docker-desktop is drawing on, but I've run out of steam now so am wondering whether anyone else has made progress?
@freemvmt I haven't used apparmor but think you want to look at this thread https://github.com/moby/moby/issues/33060#issuecomment-1698935183 you probably need "docker-default" profile
thanks @darkjackx i forgot to execute some commands during my installation process
@darkjackx thanks it worked!!
Я только что установил Docker Desktop с Ubuntu 24.04 LTS
- запустите их как url https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
sudo apt-get update sudo apt-get install ca-certificates curl sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt-get update
- запустить sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- установить https://desktop.docker.com/linux/main/amd64/149282/docker-desktop-4.30.0-amd64.deb?utm_source=docker&utm_medium=webreferral&utm_campaign=docs-driven-download-linux-amd64&_gl=1srqb3z_gaMTIxMTU0MDM4Ny4xNzEwODk3NzI1_ga_XJWPQMJYHQ*MTcxNTA2Mzg0Ni41LjEuMTcxNTA2Mzg2Mi40NC4wLjA .
- выполните sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0 systemctl --user перезапустите docker-desktop
Thank you so mach! It's work in Kubuntu 24.04))