The gitlab container is running, but I can't find anything in docker ps -a

I installed Ubuntu 22.04 on windows 10 WSL2, installed docker on top of it and installed gitlab using docker-compose from root.

gitlab is running fine, but I can’t see any running containers, so I can’t work on them or manage them.
I thought it might be a double installation issue, so I checked using snap, but I don’t think I installed with snap.

root@:# docker -v
Docker version 24.0.6, build ed223bc
root@:/home/nssllnx# apt list --installed | grep 'docker'

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

docker-buildx-plugin/jammy,now 0.11.2-1~ubuntu.22.04~jammy amd64 [installed]
docker-ce-cli/jammy,now 5:24.0.6-1~ubuntu.22.04~jammy amd64 [installed]
docker-ce-rootless-extras/jammy,now 5:24.0.6-1~ubuntu.22.04~jammy amd64 [installed,automatic]
docker-ce/jammy,now 5:24.0.6-1~ubuntu.22.04~jammy amd64 [installed]
docker-compose-plugin/jammy,now 2.21.0-1~ubuntu.22.04~jammy amd64 [installed]
docker-compose/jammy,now 1.29.2-1 all [installed]
python3-docker/jammy,now 5.0.3-1 all [installed,automatic]
python3-dockerpty/jammy,now 0.4.1-2 all [installed,automatic]
root@:/home/nssllnx# snap list

Name                      Version          Rev    Tracking         Publisher   Notes
bare                      1.0              5      latest/stable    canonical✓  base
core22                    20230801         864    latest/stable    canonical✓  base
gtk-common-themes         0.1-81-g442e511  1535   latest/stable/…  canonical✓  -
snapd                     2.60.4           20290  latest/stable    canonical✓  snapd
ubuntu-desktop-installer  0+git.c030903a   1271   latest/edge      canonical✓  classic
root@:/home/nssllnx# docker info
Client: Docker Engine - Community
 Version:    24.0.6
 Context:    default
 Debug Mode: false
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2-desktop.5
    Path:     /usr/local/lib/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.22.0-desktop.2
    Path:     /usr/local/lib/docker/cli-plugins/docker-compose
  dev: Docker Dev Environments (Docker Inc.)
    Version:  v0.1.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-dev
  extension: Manages Docker extensions (Docker Inc.)
    Version:  v0.2.20
    Path:     /usr/local/lib/docker/cli-plugins/docker-extension
  init: Creates Docker-related starter files for your project (Docker Inc.)
    Version:  v0.1.0-beta.8
    Path:     /usr/local/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/local/lib/docker/cli-plugins/docker-sbom
  scan: Docker Scan (Docker Inc.)
    Version:  v0.26.0
    Path:     /usr/local/lib/docker/cli-plugins/docker-scan
  scout: Docker Scout (Docker Inc.)
    Version:  v1.0.7
    Path:     /usr/local/lib/docker/cli-plugins/docker-scout

 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 2
 Server Version: 24.0.6
 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: cgroupfs
 Cgroup Version: 1
  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: 8165feabfdfe38c65b599c4993d227328c231fca
 runc version: v1.1.8-0-g82f18fe
 init version: de40ad0
 Security Options:
   Profile: unconfined
 Kernel Version:
 Operating System: Docker Desktop
 OSType: linux
 Architecture: x86_64
 CPUs: 12
 Total Memory: 7.696GiB
 Name: docker-desktop
 ID: fc0a8887-cbdb-4762-87b8-13e9b7b81955
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 HTTP Proxy: http.docker.internal:3128
 HTTPS Proxy: http.docker.internal:3128
 No Proxy: hubproxy.docker.internal
 Experimental: false
 Insecure Registries:
 Live Restore Enabled: false

WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
WARNING: daemon is not using the default seccomp profile

please help

What does docker context ls show?

I missed it earlier, but you have docker-ce installed in your WSL2 distribution AND have Docker Desktop installed on your Windows host and use the docker WSL2 integration.

in root,

root@:/home/nssllnx# docker context ls
NAME        DESCRIPTION                               DOCKER ENDPOINT               ERROR
default *   Current DOCKER_HOST based configuration   unix:///var/run/docker.sock

and normal user

nssllnx@:~$ docker context ls
NAME              DESCRIPTION                               DOCKER ENDPOINT                               ERROR
default *         Current DOCKER_HOST based configuration   unix:///var/run/docker.sock
desktop-linux     Docker Desktop                            npipe:////./pipe/dockerDesktopLinuxEngine
desktop-windows   Docker Desktop                            npipe:////./pipe/dockerDesktopWindowsEngine

and windows cmd

C:\Users\nssl>docker context ls
NAME                TYPE                DESCRIPTION                               DOCKER ENDPOINT                               KUBERNETES ENDPOINT   ORCHESTRATOR
default *           moby                Current DOCKER_HOST based configuration   npipe:////./pipe/docker_engine
desktop-linux       moby                Docker Desktop                            npipe:////./pipe/dockerDesktopLinuxEngine
desktop-windows     moby                Docker Desktop                            npipe:////./pipe/dockerDesktopWindowsEngine

I know I’m doing something wrong, but I’m a newbie. so don’t know how many dockers are running in my environment.

Have you checked the other contexts, if the containers are deployed there?

I can only recommend switching to the contexts docker context use ${context name}, because your containers must be running in one of those contexts.

Then clean up the deployed containers in the unwanted context, and deploy them in the context you want the containers to run.

Are you sure you want docker-ce installed when you already use Docker Desktop?