dockerdocker-desktop

Docker desktop not showing running containers


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?


Solution

  • 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