Docker desktop not showing running containers
Asked Answered
P

4

25

I am using Docker desktop (Beta) on ubuntu 22, after the installation everything seemed fine. Now I am trying to use Docker Desktop but it shows no container. However I can run a container on the command line:

I am running the initial recommended container docker run -d -p 80:80 docker/getting-started
blah@blah-laptop:~$ docker ps
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
blah@blah-laptop:~$ docker run -d -p 80:80 docker/getting-started
b04dad852c36d70393e464ec026adfedb5be2d692557cd70327dc29b0b51c8c5
blah@blah-laptop:~$ docker ps -a
CONTAINER ID   IMAGE                    COMMAND                  CREATED         STATUS         PORTS                               NAMES
b04dad852c36   docker/getting-started   "/docker-entrypoint.…"   5 seconds ago   Up 4 seconds   0.0.0.0:80->80/tcp, :::80->80/tcp   pensive_lamport
blah@blah-laptop:~$ 

The interesting part is the container doesn't appear on Docker Desktop

enter image description here

I tried to change the directory on "settings -> resources", and it added "DockerDestop" ate the end of it: enter image description here

running the diagnostic tool, the error seems to be like a windows error (which doesn't make much sense)

[PASS] DD0031: does the Docker API work?
[PASS] DD0004: is the Docker engine running?
[PASS] DD0011: are the LinuxKit services running?
[PASS] DD0016: is the LinuxKit VM running?
[FAIL] DD0001: is the application running? Docker is not running
[FAIL] DD0018: does the host support virtualization? not implemented
[PASS] DD0017: can a VM be started?
[PASS] DD0015: are the binary symlinks installed?
[PASS] DD0003: is the Docker CLI working?
[PASS] DD0013: is the $PATH ok?
[PASS] DD0007: is the backend responding?
[FAIL] DD0014: are the backend processes running? 3 errors occurred:
    * querying com.docker.backend process: is it running as a different user?: readlink /proc/3726/exe: permission denied
    * querying com.docker.backend process: is it running as a different user?: readlink /proc/3770/exe: permission denied
    * com.docker.hyperkit is not running


[PASS] DD0008: is the native API responding?
[FAIL] DD0009: is the vpnkit API responding? dial unix /home/blah/.docker/desktop/vpnkit.diag.sock: connect: no such file or directory
[PASS] DD0010: is the Docker API proxy responding?
[PASS] DD0012: is the VM networking working?
[PASS] DD0032: do Docker networks overlap with host IPs?
[SKIP] DD0030: is the image access management authorized?
[PASS] DD0033: does the host have Internet access?
1 failures detected
1 : does the host support virtualization?
    Failed with: not implemented
The Docker engine runs inside a Linux VM. Therefore the host must support virtualization.

Check that hardware-assisted virtualization (either Intel VMX or AMD SVM) and Data Execution Prevention (sometimes labeled XD or Execute Disable or NX) are enabled in your BIOS.

Check your bootloader is configured to launch Hyper-V.

See https://docs.docker.com/desktop/windows/troubleshoot/#virtualization

self-diagnose took 1.082803913s

Any ideas about what to try?

Ponce answered 19/4, 2022 at 14:18 Comment(4)
How are you running Docker Desktop?Tommyetommyrot
I checked the option to run on during the startup.Ponce
run it as the user who is running dockerTommyetommyrot
already did, the issue remains the same :(Ponce
P
39

Figure out my mistake, I was running docker in the wrong context. It was using the default, when I changed the context to docker-desktop it worked.


blah@blah-laptop:~$ docker context ls
NAME            DESCRIPTION                               DOCKER ENDPOINT                                   KUBERNETES ENDPOINT   ORCHESTRATOR
default *       Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                             swarm
desktop-linux                                             unix:///home/blah/.docker/desktop/docker.sock                         
rootless        Rootless mode                             unix:///run/user/1000/docker.sock                                       
blah@blah-laptop:~$ docker context use desktop-linux
desktop-linux
Current context is now "desktop-linux"
blah@blah-laptop:~$ docker context ls
NAME              DESCRIPTION                               DOCKER ENDPOINT                                   KUBERNETES ENDPOINT   ORCHESTRATOR
default           Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                             swarm
desktop-linux *                                             unix:///home/blah/.docker/desktop/docker.sock                         
rootless          Rootless mode                             unix:///run/user/1000/docker.sock   
Ponce answered 20/4, 2022 at 8:6 Comment(2)
helped me out after installing docker-desktop on ubuntu; docs.docker.com/engine/context/working-with-contextsOgilvy
Thanks, I never aware there is difference in running docker CLI and docker desktopMarketing
L
1

Answer for ubuntu users Please create docker context

docker context create desktop-linux --description "Docker Desktop" --docker "host=unix:///home/YOUR_USER_NAME/.docker/desktop/docker.sock"
Lorettelorgnette answered 31/10, 2023 at 13:8 Comment(0)
I
0

I was facing the same issue where containers where not showing up. By running these commands it worked. cd "C:\Program Files\Docker\Docker" ./DockerCli.exe -SwitchDaemon

Inertia answered 7/8, 2023 at 18:10 Comment(0)
B
0

my device is ubuntu.

the docker desktop just show current user's images and containers.

but i used

sudo docker pull nginx

so my images and containers are root's.

so i can not see root's images and containers in the docker desktop

when i use

docker context create desktop-linux --description "Docker Desktop" --docker "host=unix:///home/YOUR_USER_NAME/.docker/desktop/docker.sock"

docker context use desktop-linux

docker pull nginx

i can see current user's images and containers in the docker desktop

Berkey answered 12/7, 2024 at 7:58 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.