Running Containers not showing in Docker-Desktop under Linux

I have docker-desktop installed but I have never been able to get it to work…

version:

docker-desktop-4.29.0-145265.x86_64

docker version:

docker-compose-plugin-2.26.1-1.fc40.x86_64
docker-buildx-plugin-0.14.0-1.fc40.x86_64
docker-ce-cli-26.1.0-1.fc40.x86_64
docker-ce-rootless-extras-26.1.0-1.fc40.x86_64
docker-ce-26.1.0-1.fc40.x86_64

Linux:

Fedora 40 X86_64

🕙 15:42:09 ➜ docker ps -a
CONTAINER ID   IMAGE            COMMAND                  CREATED        STATUS       PORTS                                                  NAMES
9744e1c8fb81   dpage/pgadmin4   "/entrypoint.sh"         2 months ago   Up 7 hours   443/tcp, 0.0.0.0:16543->80/tcp, :::16543->80/tcp       pgadmin
86eb915477dd   postgres         "docker-entrypoint.s…"   2 months ago   Up 7 hours   0.0.0.0:5432->5432/tcp, :::5432->5432/tcp              postgres
742e7b447609   phpmyadmin       "/docker-entrypoint.…"   2 months ago   Up 7 hours   0.0.0.0:8080->80/tcp, :::8080->80/tcp                  phpmyadmin
7f5fb9347098   mysql:latest     "docker-entrypoint.s…"   2 months ago   Up 7 hours   0.0.0.0:3306->3306/tcp, :::3306->3306/tcp, 33060/tcp   mysql
a8b0656810fe   mongo-express    "/sbin/tini -- /dock…"   2 months ago   Up 7 hours   0.0.0.0:8081->8081/tcp, :::8081->8081/tcp              mongo-express
664a5b740960   mongo            "docker-entrypoint.s…"   2 months ago   Up 7 hours   0.0.0.0:27017->27017/tcp, :::27017->27017/tcp          mongo
🕙 17:54:27 ➜ docker images
REPOSITORY       TAG       IMAGE ID       CREATED        SIZE
mongo            latest    c47dc3359f88   2 months ago   755MB
phpmyadmin       latest    bb1eaeafd994   2 months ago   562MB
mongo-express    latest    668a20be0e80   3 months ago   275MB
mysql            latest    ba6b635d3b6b   3 months ago   632MB
dpage/pgadmin4   latest    76a6f9095825   3 months ago   491MB
postgres         latest    b0b90c1d9579   3 months ago   425MB
🕙 18:08:56 ➜ docker context ls                   
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                 KUBERNETES ENDPOINT   ORCHESTRATOR
default             moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                           
desktop-linux       moby                Docker Desktop                            unix:///home/hhlp/.docker/desktop/docker.sock                         
linux-desktop *     moby                Docker Desktop                            unix:///var/run/docker.sock                                           
🕙 18:20:23 ➜ docker context inspect linux-desktop
[
    {
        "Name": "linux-desktop",
        "Metadata": {
            "Description": "Docker Desktop"
        },
        "Endpoints": {
            "docker": {
                "Host": "unix:///var/run/docker.sock",
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/home/hhlp/.docker/contexts/meta/2d63344ddf88473ca865345f1aa3004336a629a4ada76cc0ea09a75fbd9c58d0",
            "TLSPath": "/home/hhlp/.docker/contexts/tls/2d63344ddf88473ca865345f1aa3004336a629a4ada76cc0ea09a75fbd9c58d0"
        }
    }
]

if I’ve changed my context to desktop-linux I’ve received the following messages:

🕙 18:13:45 ➜ docker ps -a
Cannot connect to the Docker daemon at unix:///home/hhlp/.docker/desktop/docker.sock. Is the docker daemon running?
🕙 18:17:28 ➜ docker context inspect desktop-linux                                                                                                        
[                                                                                                                                                         
    {                                                                                                                                                     
        "Name": "desktop-linux",                                                                                                                          
        "Metadata": {                                                                                                                                     
            "Description": "Docker Desktop",                                                                                                              
            "otel": {                                                                                                                                     
                "OTEL_EXPORTER_OTLP_ENDPOINT": "unix:///home/hhlp/.docker/desktop/user-analytics.otlp.grpc.sock"
            }                                                                                                                                             
        },                                                                   
        "Endpoints": {                                                       
            "docker": {                                                      
                "Host": "unix:///home/hhlp/.docker/desktop/docker.sock",
                "SkipTLSVerify": false                                       
            }                                                                
        },                                                                                                                                                
        "TLSMaterial": {},                                                                                                                                
        "Storage": {                                                                                                                                      
            "MetadataPath": "/home/hhlp/.docker/contexts/meta/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e",
            "TLSPath": "/home/hhlp/.docker/contexts/tls/fe9c6bd7a66301f49ca9b6a70b217107cd1284598bfc254700c989b916da791e"                                 
        }                                                                                                                                                 
    }                                 
]                                     

if I’ve changed my context to default:

  • I can see docker ps -a
  • I need to use sudo to see docker image ls
🕙 18:21:14 ➜ docker context inspect default      
[
    {
        "Name": "default",
        "Metadata": {},
        "Endpoints": {
            "docker": {
                "Host": "unix:///var/run/docker.sock",
                "SkipTLSVerify": false
            }
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "\u003cIN MEMORY\u003e",
            "TLSPath": "\u003cIN MEMORY\u003e"
        }
    }
]

in none of these cases docker-desktop see them

my /home/hhlp/.docker/desktop:

thx in advanced…

Regards.,

You have to decide what you want. Running Docker Desktop or running Docker CE. Uninstall the one thaty ou don’t need. Only the Docker Client (docker-ce-cli) is needed for the Desktop but it is installed with the Desktop.

If you need both, use the docker context ls command to see the contexts and switch to desktop-linux by running docker context use desktop-linux. Then you can communicate with the Desktop’s Docker and when you run a ontainer it will run in the Desktop’s virtual machine and you wil see it.

don’t make any change continue without showing the docker running container

the unique diferences is that I need to use sudo with docker ps and docker image ls to see some output

uid=1000(hhlp) gid=1000(hhlp) grupos=1000(hhlp),10(wheel),976(docker),983(libvirt) contexto=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Regards.,

Have you tried what I suggested? Sudo will run the commands as root and root has no desktop-linux context, only the default so it will always use Docker CE, if you have both.

yes i switch to docker context use desktop-linux

NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                                 KUBERNETES ENDPOINT   ORCHESTRATOR
default             moby                Current DOCKER_HOST based configuration   unix:///var/run/docker.sock                                           
desktop-linux *     moby                Docker Desktop                            unix:///home/hhlp/.docker/desktop/docker.sock                         
linux-desktop       moby                Docker Desktop                            unix:///var/run/docker.sock    

I continue witout seen it

if not posible to use both at the same time??? I tought is it posible

Regards.,

Sorry, I’have lost the thread. So does it work you switch context to desktop-linux and run the containers there without sudo?

I guess this is the answer to my previous question, but please, confirm it that you mean you don’t see the created containers despite the fact you created the containers without using sudo…

You can have Docker CE and Docker Desktop at the same time, but you will always need to make sure you use the right context. Don’t use sudo if you want to use Docker Desktop.

I see you have desktop-linux and also linux-desktop contexts. Did you create the latter or was it created by Docker Desktop automatically, because it shouldn’t?