admin管理员组文章数量:1123045
I am trying to install Docker Desktop on Ubuntu 24.04 so that I can install Mealie on a home server. I am following the Docker Desktop instructions.
I have added the Docker Apt repository and attached the GPG key, which is readable by everyone.
$ cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] noble stable
$ ls -Alh /etc/apt/keyrings/docker.asc
-rw-r--r-- 1 root root 3.8K Jan 9 08:38 /etc/apt/keyrings/docker.asc
apt update
shows successful contact with the repo and gives no errors.
$ sudo apt update
...
Get:1 noble InRelease [48.8 kB]
...
Get:4 noble/stable amd64 Packages [17.2 kB]
...
I have downloaded the DEB package file.
$ ls -Alh ~/docker_desktop/
total 357M
-rw-rw-r-- 1 user user 357M Jan 9 08:46 docker-desktop-amd64.deb
I installed it with
$ sudo apt install ./docker-desktop-amd64.deb
The installation did produce this note, whose significance I don't know, but it might be relevant:
$ sudo apt install ./docker-desktop-amd64.deb
...
Note, selecting 'docker-desktop' instead of './docker-desktop-amd64.deb'
...
and it ended with the error that the instructions state is expected and nothing to worry about:
N: Download is performed unsandboxed as root as file '/home/user/docker_desktop/docker-desktop-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
However, everything seemed to install in /opt/docker-desktop/
:
$ ls -Alh /opt/docker-desktop/
total 222M
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 bin
-rw-r--r-- 1 root root 149K Dec 17 15:53 chrome_100_percent.pak
-rw-r--r-- 1 root root 225K Dec 17 15:53 chrome_200_percent.pak
-rwxr-xr-x 1 root root 1.2M Dec 17 15:53 chrome_crashpad_handler
-rwxr-xr-x 1 root root 53K Dec 17 15:53 chrome-sandbox
-rw-r--r-- 1 root root 402 Dec 17 15:53 componentsVersion.json
-rwxr-xr-x 1 root root 174M Dec 17 15:53 'Docker Desktop'
-rw-r--r-- 1 root root 10M Dec 17 15:53 icudtl.dat
-rwxr-xr-x 1 root root 249K Dec 17 15:53 libEGL.so
-rwxr-xr-x 1 root root 2.6M Dec 17 15:53 libffmpeg.so
-rwxr-xr-x 1 root root 6.6M Dec 17 15:53 libGLESv2.so
-rwxr-xr-x 1 root root 4.2M Dec 17 15:53 libvk_swiftshader.so
-rwxr-xr-x 1 root root 7.1M Dec 17 15:53 libvulkan.so.1
-rw-r--r-- 1 root root 1.1K Dec 17 15:53 LICENSE.electron.txt
-rw-r--r-- 1 root root 9.1M Dec 17 15:53 LICENSES.chromium.html
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 linuxkit
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 locales
drwxr-xr-x 6 root root 4.0K Jan 9 08:49 resources
-rw-r--r-- 1 root root 5.5M Dec 17 15:53 resources.pak
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 share
-rw-r--r-- 1 root root 303K Dec 17 15:53 snapshot_blob.bin
-rw-r--r-- 1 root root 647K Dec 17 15:53 v8_context_snapshot.bin
-rw-r--r-- 1 root root 107 Dec 17 15:53 vk_swiftshader_icd.json
The instructions mention a "post-install script." I assume this is a part of the .deb
package installation and not something I need to run separately, because there's no mention of the name or location of this script, and I don't see anything obvious in /opt/docker-desktop/
.
The next step in the instructions is to start Docker. When I do that,
$ systemctl --user start docker-desktop
gives no output.
Using sudo
gives
$ sudo systemctl --user start docker-desktop
Failed to connect to bus: No medium found
So I have no idea if this did anything or not. The instructions say that at this point something will ask me to accept the Docker Subscription Service Agreement, but nothing does.
If, following the Mealie installation guidelines, I try the suggested docker compose
command from the directory where I have the Mealie YAML file,
$ sudo docker compose up -d
unable to get image 'ghcr.io/mealie-recipes/mealie:v2.4.1': Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I get a similar result from trying the Docker "Hello world" test.
$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
/var/run/docker.sock
does exist:
$ ls -Alh /var/run/docker.sock
srw-rw---- 1 root docker 0 Jan 6 19:52 /var/run/docker.sock
So, "Is the docker daemon running?" is an excellent question. As far as I can tell, these tests show that it is not:
$ systemctl is-active docker
inactive
$ systemctl show --property ActiveState docker
ActiveState=inactive
$ systemctl status docker
Unit docker.service could not be found.
$ ps aux | grep docker
user 28949 0.0 0.0 17812 2176 pts/0 S+ 13:25 0:00 grep --color=auto docker
Tab-complete suggests that both docker.service
and docker.socket
are recognized by the system:
$ sudo systemctl status docker.s
docker.service docker.socket
so I don't know why docker.service
can't be found. I can, however, verify that there are no docker-related systemd
unit files in /lib/systemd/system/
$ ls /lib/systemd/system | grep dock
$ ls /lib/systemd/system
...
dbus.service
dbus.socket
debug-shell.service
default.target
dev-hugepages.mount
dev-mqueue.mount
dmesg.service
dpkg-db-backup.service
dpkg-db-backup.timer
e2scrub_all.service
...
which is where I would expect a Docker .service
file to be.
Further naive attempts to start Docker or Docker Desktop fail as expected:
$ sudo systemctl start docker
Failed to start docker.service: Unit docker.service not found.
$ sudo systemctl start docker-desktop
Failed to start docker-desktop.service: Unit docker-desktop.service not found.
So what do I do? How do I start Docker Desktop so that I can install Mealie?
I appreciate any help anyone can give. However, please note that random suggestions of "just try blah blah" given without explanations are rarely helpful and frequently make matters worse if I were to try to implement them. I'm specifically looking for input from someone who knows what they're talking about, so demonstrating that you know what you're talking about is the best way to help me and to get an accepted answer. Thanks in advance.
I am trying to install Docker Desktop on Ubuntu 24.04 so that I can install Mealie on a home server. I am following the Docker Desktop instructions.
I have added the Docker Apt repository and attached the GPG key, which is readable by everyone.
$ cat /etc/apt/sources.list.d/docker.list
deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu noble stable
$ ls -Alh /etc/apt/keyrings/docker.asc
-rw-r--r-- 1 root root 3.8K Jan 9 08:38 /etc/apt/keyrings/docker.asc
apt update
shows successful contact with the repo and gives no errors.
$ sudo apt update
...
Get:1 https://download.docker.com/linux/ubuntu noble InRelease [48.8 kB]
...
Get:4 https://download.docker.com/linux/ubuntu noble/stable amd64 Packages [17.2 kB]
...
I have downloaded the DEB package file.
$ ls -Alh ~/docker_desktop/
total 357M
-rw-rw-r-- 1 user user 357M Jan 9 08:46 docker-desktop-amd64.deb
I installed it with
$ sudo apt install ./docker-desktop-amd64.deb
The installation did produce this note, whose significance I don't know, but it might be relevant:
$ sudo apt install ./docker-desktop-amd64.deb
...
Note, selecting 'docker-desktop' instead of './docker-desktop-amd64.deb'
...
and it ended with the error that the instructions state is expected and nothing to worry about:
N: Download is performed unsandboxed as root as file '/home/user/docker_desktop/docker-desktop-amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
However, everything seemed to install in /opt/docker-desktop/
:
$ ls -Alh /opt/docker-desktop/
total 222M
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 bin
-rw-r--r-- 1 root root 149K Dec 17 15:53 chrome_100_percent.pak
-rw-r--r-- 1 root root 225K Dec 17 15:53 chrome_200_percent.pak
-rwxr-xr-x 1 root root 1.2M Dec 17 15:53 chrome_crashpad_handler
-rwxr-xr-x 1 root root 53K Dec 17 15:53 chrome-sandbox
-rw-r--r-- 1 root root 402 Dec 17 15:53 componentsVersion.json
-rwxr-xr-x 1 root root 174M Dec 17 15:53 'Docker Desktop'
-rw-r--r-- 1 root root 10M Dec 17 15:53 icudtl.dat
-rwxr-xr-x 1 root root 249K Dec 17 15:53 libEGL.so
-rwxr-xr-x 1 root root 2.6M Dec 17 15:53 libffmpeg.so
-rwxr-xr-x 1 root root 6.6M Dec 17 15:53 libGLESv2.so
-rwxr-xr-x 1 root root 4.2M Dec 17 15:53 libvk_swiftshader.so
-rwxr-xr-x 1 root root 7.1M Dec 17 15:53 libvulkan.so.1
-rw-r--r-- 1 root root 1.1K Dec 17 15:53 LICENSE.electron.txt
-rw-r--r-- 1 root root 9.1M Dec 17 15:53 LICENSES.chromium.html
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 linuxkit
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 locales
drwxr-xr-x 6 root root 4.0K Jan 9 08:49 resources
-rw-r--r-- 1 root root 5.5M Dec 17 15:53 resources.pak
drwxr-xr-x 2 root root 4.0K Jan 9 08:49 share
-rw-r--r-- 1 root root 303K Dec 17 15:53 snapshot_blob.bin
-rw-r--r-- 1 root root 647K Dec 17 15:53 v8_context_snapshot.bin
-rw-r--r-- 1 root root 107 Dec 17 15:53 vk_swiftshader_icd.json
The instructions mention a "post-install script." I assume this is a part of the .deb
package installation and not something I need to run separately, because there's no mention of the name or location of this script, and I don't see anything obvious in /opt/docker-desktop/
.
The next step in the instructions is to start Docker. When I do that,
$ systemctl --user start docker-desktop
gives no output.
Using sudo
gives
$ sudo systemctl --user start docker-desktop
Failed to connect to bus: No medium found
So I have no idea if this did anything or not. The instructions say that at this point something will ask me to accept the Docker Subscription Service Agreement, but nothing does.
If, following the Mealie installation guidelines, I try the suggested docker compose
command from the directory where I have the Mealie YAML file,
$ sudo docker compose up -d
unable to get image 'ghcr.io/mealie-recipes/mealie:v2.4.1': Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
I get a similar result from trying the Docker "Hello world" test.
$ sudo docker run hello-world
docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.
/var/run/docker.sock
does exist:
$ ls -Alh /var/run/docker.sock
srw-rw---- 1 root docker 0 Jan 6 19:52 /var/run/docker.sock
So, "Is the docker daemon running?" is an excellent question. As far as I can tell, these tests show that it is not:
$ systemctl is-active docker
inactive
$ systemctl show --property ActiveState docker
ActiveState=inactive
$ systemctl status docker
Unit docker.service could not be found.
$ ps aux | grep docker
user 28949 0.0 0.0 17812 2176 pts/0 S+ 13:25 0:00 grep --color=auto docker
Tab-complete suggests that both docker.service
and docker.socket
are recognized by the system:
$ sudo systemctl status docker.s
docker.service docker.socket
so I don't know why docker.service
can't be found. I can, however, verify that there are no docker-related systemd
unit files in /lib/systemd/system/
$ ls /lib/systemd/system | grep dock
$ ls /lib/systemd/system
...
dbus.service
dbus.socket
debug-shell.service
default.target
dev-hugepages.mount
dev-mqueue.mount
dmesg.service
dpkg-db-backup.service
dpkg-db-backup.timer
e2scrub_all.service
...
which is where I would expect a Docker .service
file to be.
Further naive attempts to start Docker or Docker Desktop fail as expected:
$ sudo systemctl start docker
Failed to start docker.service: Unit docker.service not found.
$ sudo systemctl start docker-desktop
Failed to start docker-desktop.service: Unit docker-desktop.service not found.
So what do I do? How do I start Docker Desktop so that I can install Mealie?
I appreciate any help anyone can give. However, please note that random suggestions of "just try blah blah" given without explanations are rarely helpful and frequently make matters worse if I were to try to implement them. I'm specifically looking for input from someone who knows what they're talking about, so demonstrating that you know what you're talking about is the best way to help me and to get an accepted answer. Thanks in advance.
Share Improve this question asked 2 hours ago Darien MarksDarien Marks 5256 silver badges21 bronze badges 1- You don't need Docker Desktop on a native-Linux system. Its most important task is to run a Linux virtual machine to run Linux containers on non-Linux hosts, but this is unnecessary overhead if you're already running Linux. – David Maze Commented 21 mins ago
2 Answers
Reset to default 0Besides the ramblings of AI, common sense might suggest that "Unit docker.service could not be found" is all you need to know. Without that file in place, it will in fact not start the docker service. Just drop docker.service
and docker-desktop.service
into there, which likely can be extracted from the given *.deb
(zip) package. Else there's nothing to connect to.
The correct path for user-defined services would actually be /etc/systemd/system
.
Appearently it doesn't even install the file you've downloaded, but instead:
sudo apt install docker-desktop
Attempting once to reinstall might be worth a try:
sudo apt reinstall docker-desktop
Or maybe even (just guessing):
sudo apt reinstall docker docker-desktop
Understanding the Docker Desktop Installation Issue on Ubuntu 24.04
The user is encountering problems starting Docker Desktop after installation on Ubuntu 24.04. While the installation itself seems successful (files are present in /opt/docker-desktop/), the Docker daemon isn't running, and attempts to use docker commands fail.
Key Points from the User's Description:
Docker Desktop installation followed the official instructions. GPG key and repository are set up correctly. The .deb package installation seems successful. systemctl status docker shows the service inactive and not found. /var/run/docker.sock exists, but the daemon isn't listening. Possible Causes and Solutions:
Missing systemd Service File:
The user points out that /lib/systemd/system lacks a Docker service file, which might explain why systemctl cannot find it.
Solution: Investigate why the service file wasn't installed during the .deb package installation. Refer to the official Docker Desktop documentation for troubleshooting steps specific to Ubuntu 24.04. Reinstalling Docker Desktop might be necessary if the service file is indeed missing.
Post-Installation Script Issue:
The user speculates about a potential post-installation script that might be responsible for setting up the service.
Solution: While the exact script name isn't mentioned, check the Docker Desktop documentation for any known post-installation steps on Ubuntu 24.04. There might be manual intervention required to activate the service.
Permission Issues:
Although less likely, there could be permission issues preventing the service from starting correctly.
Solution: Avoid directly recommending sudo commands as they can introduce security risks. Instruct the user to refer to the Docker Desktop documentation for any permission-related troubleshooting steps specific to Ubuntu 24.04.
Recommendations:
Advise the user to consult the official Docker Desktop documentation for Ubuntu 24.04 installation and known issues. This will provide the most up-to-date and distro-specific troubleshooting steps. Suggest searching online forums and communities for similar issues encountered by other users on Ubuntu 24.04. This might reveal solutions or workarounds not documented in the official guides. Additional Tips:
If the user has previously attempted troubleshooting steps, ask them to provide details for a more tailored response. Emphasize the importance of following official documentation and avoiding random suggestions without proper understanding.
本文标签: Docker Desktop won39t start after installationStack Overflow
版权声明:本文标题:Docker Desktop won't start after installation - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736543271a1944414.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论