introduce
Docker CE and Docker Desktop are often installed when people just want a desktop. Then they actually try to connect to the wrong daemon. I wrote about different types of Docker installations inYou run containers, not Docker – Discussing Docker variants, components and versioning“
So sometimes you wonder which Docker variant you are running. Maybe you don’t remember, or you accidentally enabled an option when installing the host operating system, or someone else installed Docker and you had to take over the project. When you ask an official question Docker Community Forumwe also need to know which one you are using, as the cause and solution of the problem may be completely different.
You can find out which Docker is installed, but first you need to know what operating system you are using and which package managers it supports. You then need to know how to list installed packages, using a supported package manager and listing process will also help.
In this article, I try to summarize the different types of Docker installations and how to tell which variant you have.
You can also have stuff that I haven’t written about in this post, but I hope you can use these methods to discover stuff that you or anyone else has installed before.
Table of contents
Docker engine on Linux
Number of dockerd processes running directly on Linux
» Return to table of contents «
When using Docker Engine directly on Linux, based on Moby Projectyou can run
pidof dockerd
This should display a number, which is the process ID of the Docker daemon. If you don’t get any results, the daemon is not running, or you are most likely running the daemon on a remote computer or virtual machine. This is less likely, but it’s also possible that you found another unofficial way to install Docker and the daemon executable has a different name. Then you need to find the maintainer of the Docker daemon and ask for their assistance.
If you get multiple process IDs, it means you have multiple Docker daemons running, which is most likely an accident. You should only run one Docker daemon unless you are really experienced and you know how to ensure that the daemons use different sockets, directories and iptables rules (or only enable them for one daemon).
Docker as a Snap package
» Return to table of contents «
When Docker is installed as Snap bag On Linux, you can use the following command:
snap list docker
If you get an error message, it means you don’t have a snap package manager at all, or Docker is not installed as a snap package. Otherwise, you’ll get something like this:
Name Version Rev Tracking Publisher Notes
docker 27.2.0 2964 latest/stable canonical✓ -
The exact output may vary depending on which version you have. The process can then be found in the process list using the following command:
ps aux | grep dockerd | grep snap
If the Docker daemon installed as a Snap suite is also running, you will get the following output:
root 916 0.0 1.6 2037476 67312 ? Ssl 15:51 0:02 dockerd --group docker --exec-root=/run/snap.docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/run/snap.docker/docker.pid --config-file=/var/snap/docker/2964/config/daemon.json
Install Docker using your Linux distribution’s default package manager
Docker on Debian-based Linux distributions
» Return to table of contents «
On Debian-based Linux distributions, you can use dpkg
Find out if Docker is installed as APT package.
dpkg -l 'docker*' | grep '^ii'
The output will be like this:
ii docker-buildx-plugin 0.19.2-1~ubuntu.24.04~noble arm64 Docker Buildx cli plugin.
ii docker-ce 5:27.4.0-1~ubuntu.24.04~noble arm64 Docker: the open-source application container engine
ii docker-ce-cli 5:27.4.0-1~ubuntu.24.04~noble arm64 Docker CLI: the open-source application container engine
ii docker-ce-rootless-extras 5:27.4.0-1~ubuntu.24.04~noble arm64 Rootless support for Docker.
ii docker-compose-plugin 2.31.0-1~ubuntu.24.04~noble arm64 Docker Compose (V2) plugin for the Docker CLI.
Recent APT versions also support the following commands:
apt list --installed 'docker*'
Then the output will be similar to the following:
Listing... Done
docker-buildx-plugin/noble,now 0.19.2-1~ubuntu.24.04~noble arm64 [installed]
docker-ce-cli/noble,now 5:27.4.0-1~ubuntu.24.04~noble arm64 [installed]
docker-ce-rootless-extras/noble,now 5:27.4.0-1~ubuntu.24.04~noble arm64 [installed,automatic]
docker-ce/noble,now 5:27.4.0-1~ubuntu.24.04~noble arm64 [installed]
docker-compose-plugin/noble,now 2.31.0-1~ubuntu.24.04~noble arm64 [installed]
The above output shows that I have the Docker CE package installed. If you installed docker.io
Instead, you will get one of the following outputs:
ii docker.io 26.1.3-0ubuntu1~24.04.1 arm64 Linux container runtime
or
Listing... Done
docker.io/noble-updates,now 26.1.3-0ubuntu1~24.04.1 arm64 [installed]
Docker on Red Hat-based Linux distributions
» Return to table of contents «
Red Hat-based Linux distributions may use dnf
or yum
. You can then search for packages by executing:
dnf list --installed 'docker*'
# or
yum list --installed 'docker*'
Finding non-snap dockerd processes on Linux
» Return to table of contents «
Regardless of the package manager and the exact package, you can get the docker daemon in the terminal:
ps auxf | grep dockerd | grep -v 'snap\|grep'
You will get something like this:
root 5584 0.0 1.7 1966352 68348 ? Ssl 20:08 0:00 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
If you see “rootlesskit” in the output as shown below
ubuntu 1767 0.0 0.2 1826120 11392 ? Ssl 16:25 0:00 \_ rootlesskit --state-dir=/run/user/1000/dockerd-rootless --net=slirp4netns --mtu=65520 --slirp4netns-sandbox=auto --slirp4netns-seccomp=auto --disable-host-loopback --port-driver=builtin --copy-up=/etc --copy-up=/run --propagation=rslave /usr/bin/dockerd-rootless.sh
ubuntu 1778 0.0 0.2 1899656 9984 ? Sl 16:25 0:00 \_ /proc/self/exe --state-dir=/run/user/1000/dockerd-rootless --net=slirp4netns --mtu=65520 --slirp4netns-sandbox=auto --slirp4netns-seccomp=auto --disable-host-loopback --port-driver=builtin --copy-up=/etc --copy-up=/run --propagation=rslave /usr/bin/dockerd-rootless.sh
ubuntu 1808 0.0 1.6 2039632 66504 ? Sl 16:25 0:00 | \_ dockerd
You have rootless dockerwhich simply means that the daemon is executing as a non-root user and also using different sockets and Docker data directories.
Docker desktop
Docker Desktop on Linux
» Return to table of contents «
Docker Desktop can be installed on Linux, macOS, and Windows (except Windows Server), so the way you look for processes in the process list may vary, but in this article I’m focusing on Linux because that’s where most people You can find places to get confused about the many ways to install Docker.
If you have Docker Desktop installed on Linux, the following command will show you it:
ps aux | grep docker-desktop | grep -v grep
Output:
takacsa+ 9804 0.0 0.5 1335920 81420 ? Ssl 21:43 0:00 /opt/docker-desktop/bin/com.docker.backend
takacsa+ 9818 0.2 0.6 1402484 110804 ? Sl 21:43 0:03 /opt/docker-desktop/bin/com.docker.backend run
takacsa+ 9863 0.3 1.2 1187000148 198528 ? Sl 21:43 0:05 /opt/docker-desktop/Docker Desktop --reason=open-tray --analytics-enabled=false --name=dashboard
takacsa+ 9912 0.0 0.3 33806596 52224 ? S 21:43 0:00 /opt/docker-desktop/Docker Desktop --type=zygote --no-zygote-sandbox
takacsa+ 9913 0.0 0.3 33806588 52352 ? S 21:43 0:00 /opt/docker-desktop/Docker Desktop --type=zygote
takacsa+ 9915 0.0 0.0 33806616 12876 ? S 21:43 0:00 /opt/docker-desktop/Docker Desktop --type=zygote
takacsa+ 9972 0.1 0.8 34220684 144844 ? Sl 21:43 0:02 /opt/docker-desktop/Docker Desktop --type=gpu-process --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAEAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version
takacsa+ 9977 0.0 0.4 33872616 68480 ? Sl 21:43 0:00 /opt/docker-desktop/Docker Desktop --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --standard-schemes=app --secure-schemes=app --fetch-schemes=scout-graphql,scout-rest,docker-hub,docker-extensions-be,project-api --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version
takacsa+ 10050 0.8 0.9 1186775380 159476 ? Sl 21:43 0:11 /opt/docker-desktop/Docker Desktop --type=renderer --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --standard-schemes=app --secure-schemes=app --fetch-schemes=scout-graphql,scout-rest,docker-hub,docker-extensions-be,project-api --app-path=/opt/docker-desktop/resources/app.asar --enable-sandbox --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=4 --time-ticks-at-unix-epoch=-1734808931784927 --launch-time-ticks=4855412489 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version --desktop-ui-launch-options={"isPackaged":true,"isMainWindow":true,"isE2eTest":false,"needsPrimaryIpcClient":true,"needsBackendErrorsIpcClient":true}
On Linux, support ps -f
To get the process tree, you can try the following:
ps auxf | grep docker-desktop | grep -v grep
and output:
takacsa+ 9804 0.0 0.5 1335920 81420 ? Ssl 21:43 0:00 \_ /opt/docker-desktop/bin/com.docker.backend
takacsa+ 9818 0.2 0.6 1402484 110804 ? Sl 21:43 0:03 | \_ /opt/docker-desktop/bin/com.docker.backend run
takacsa+ 9863 0.3 1.2 1187000148 198588 ? Sl 21:43 0:05 | \_ /opt/docker-desktop/Docker Desktop --reason=open-tray --analytics-enabled=false --name=dashboard
takacsa+ 9912 0.0 0.3 33806596 52224 ? S 21:43 0:00 | \_ /opt/docker-desktop/Docker Desktop --type=zygote --no-zygote-sandbox
takacsa+ 9972 0.1 0.8 34220684 144844 ? Sl 21:43 0:02 | | \_ /opt/docker-desktop/Docker Desktop --type=gpu-process --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --gpu-preferences=WAAAAAAAAAAgAAAEAAAAAAAAAAAAAAAAAABgAAEAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAGAAAAAAAAAAYAAAAAAAAAAgAAAAAAAAACAAAAAAAAAAIAAAAAAAAAA== --shared-files --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version
takacsa+ 9913 0.0 0.3 33806588 52352 ? S 21:43 0:00 | \_ /opt/docker-desktop/Docker Desktop --type=zygote
takacsa+ 9915 0.0 0.0 33806616 12876 ? S 21:43 0:00 | | \_ /opt/docker-desktop/Docker Desktop --type=zygote
takacsa+ 10050 0.7 0.9 1186775380 159476 ? Sl 21:43 0:11 | | \_ /opt/docker-desktop/Docker Desktop --type=renderer --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --standard-schemes=app --secure-schemes=app --fetch-schemes=scout-graphql,scout-rest,docker-hub,docker-extensions-be,project-api --app-path=/opt/docker-desktop/resources/app.asar --enable-sandbox --lang=en-US --num-raster-threads=4 --enable-main-frame-before-activation --renderer-client-id=4 --time-ticks-at-unix-epoch=-1734808931784927 --launch-time-ticks=4855412489 --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version --desktop-ui-launch-options={"isPackaged":true,"isMainWindow":true,"isE2eTest":false,"needsPrimaryIpcClient":true,"needsBackendErrorsIpcClient":true}
takacsa+ 9977 0.0 0.4 33872616 68480 ? Sl 21:43 0:00 | \_ /opt/docker-desktop/Docker Desktop --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --enable-crash-reporter=978d60a8-7422-4f87-adcc-19c08da28830,no_channel --user-data-dir=/home/takacsakos/.config/Docker Desktop --standard-schemes=app --secure-schemes=app --fetch-schemes=scout-graphql,scout-rest,docker-hub,docker-extensions-be,project-api --shared-files=v8_context_snapshot_data:100 --field-trial-handle=3,i,9326157886237964838,13802503777149121506,262144 --disable-features=SpareRendererForSitePerProcess --variations-seed-version
If the virtual machine is also running, you will also see the following:
takacsa+ 14622 0.0 0.0 4060012 2432 ? Sl 22:34 0:00 | \_ /opt/docker-desktop/bin/virtiofsd --socket-path=/home/takacsakos/.docker/desktop/virtiofs.sock0 -o cache=auto --shared-dir=/home --sandbox=none --announce-submounts --xattr --xattrmap=:prefix:all::user.docker.desktop.::bad:all::: --translate-uid squash-guest:0:1000:4294967295 --translate-gid squash-guest:0:1000:4294967295
takacsa+ 14670 97.7 4.4 5389724 728184 ? Sl 22:34 0:08 | \_ qemu-system-x86_64 -accel kvm -cpu host -machine q35 -m 3958 -smp 8 -kernel /opt/docker-desktop/linuxkit/kernel -append init=/init loglevel=1 root=/dev/vdb rootfstype=erofs ro vsyscall=emulate panic=0 eth0.dhcp eth1.dhcp linuxkit.unified_cgroup_hierarchy=1 vpnkit.connect=tcp+connect://192.168.65.2:40409 console=ttyS0 -serial pipe:/tmp/qemu-console888894299/fifo -netdev user,id=net0,ipv6=off,net=192.168.65.0/24,dhcpstart=192.168.65.9 -device virtio-net-pci,netdev=net0 -vga none -nographic -monitor none -drive if=none,file=/home/takacsakos/.docker/desktop/vms/0/data/Docker.raw,format=raw,id=hd0 -device virtio-blk-pci,drive=hd0,serial=dummyserial -drive if=none,file=/opt/docker-desktop/linuxkit/boot.img,format=raw,id=hd1,readonly=on -device virtio-blk-pci,drive=hd1,serial=dummyserial -object memory-backend-memfd,id=mem,size=3958M,share=on -numa node,memdev=mem -chardev socket,id=char0,path=/home/takacsakos/.docker/desktop/virtiofs.sock0 -device vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=virtiofs0
Docker Desktop on macOS
» Return to table of contents «
There aren’t as many ways to install Docker on macOS as there are on Linux, but you can still use Docker Desktop or Rancher Desktop, or just use the client when managing a remote Docker daemon on a remote server. Therefore, it is still useful to know whether the Docker Desktop operating system is installed. Of course, on macOS, there’s also the whale icon at the top of the screen, but for those of you who prefer the Terminal, or if the icon isn’t showing up, the following command will tell you if Docker Desktop is running:
ps aux | grep Docker.app | grep -v grep
The output is quite long, but you’ll also find the following sections:
/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/
Docker.app
If Desktop isn’t running but you want to know if it’s installed, you can also look for the app’s name on your Mac. Since the application name may change in future versions, search for docker
in the terminal instead of Docker.app
That’s OK, but you might have a virtual machine or any folder that appears in the process inventory, even if it’s not for Docker Desktop.
Docker Desktop on Windows
» Return to table of contents «
On Windows, you can use the Job Manager desktop application or execute the following command in PowerShell:
Get-Process | Select-String docker
The application on Windows is called “Docker Desktop”
Docker context
» Return to table of contents «
You can also check which contexts are configured for the Docker client. No matter which Docker you use, the client is most likely using the same Docker $HOME/.docker
A folder containing information about the context. While this directory can be changed, I don’t recall any client changing it unless I made a video to this end I wrote a script Just do it. The following command lists all contexts you have:
docker context ls
The output might show something like this:
NAME DESCRIPTION DOCKER ENDPOINT ERROR
default Current DOCKER_HOST based configuration unix:///var/run/docker.sock
desktop-linux * Docker Desktop unix:///home/takacsakos/.docker/desktop/docker.sock
rootless Rootless mode unix:///run/user/1000/docker.sock
The active context (used when executing docker commands) is the context with a “*” character on the right side of the context name.
The default endpoints are typically the following unix domain sockets (on Linux and macOS): unix:///var/run/docker.sock
.
Just because you see a local unix socket, it doesn’t necessarily mean that you are using a local daemon directly on the host, although that is often the case.
Therefore, the default context is usually the Docker engine executing directly on the host.
Now notice the “desktop-linux” context, it shows another unix domain socket, but we know that the Docker engine is running in the virtual machine of Docker Desktop. In fact, Docker Desktop can also use preset contexts and preset endpoints, depending on how you install it.
You always need to check the context name and description. If you don’t know what this means, you can still ask the community, but make sure to search first.
You can also notice the “no root” context. Anyone can name a context “rootless”, but this is usually the rootless version of Docker CE. This means that you most likely have Docker CE, or at least a Docker that executes directly on the Linux host.
Remote Docker daemon
» Return to table of contents «
Sometimes, your client is on your local machine, but the daemon is not only in a virtual machine, but also in a remote machine that you have no control over at all. If you control the remote computer, you most likely know it, but some CI/CD tools such as CircleCI Can support Docker engines that do not run directly in your environment. People often notice this when they try to access a container using an IP address, but it doesn’t work. The same problem occurs when you use Docker Desktop because Docker Desktop executes the Docker daemon in a virtual machine, but another scenario may be when your process is running in a container and the Docker daemon is on the host or more Possibly while executing in another container, or on a remote Docker host. It doesn’t matter if it’s a virtual machine or a physical machine.
If you are not the one who installed Docker, or even control the environment, but you pay for an online service, be sure to read the documentation and ask their support or community if possible.
in conclusion
» Return to table of contents «
Maybe you have Rancher Desktop, which uses docker as the container engine, or you can have Podman or Podman Desktop, which are not actually Docker, but the approach is the same.
- You can use the Package Manager to list installed packages and filter by package name
- or try to find it in the process list,
- or use
docker context ls
Understand the Docker context, which can help you identify the Docker daemon you are trying to connect to.
If the operating system is not Linux, you can still list running processes and installed applications using tools supported by the operating system. I wouldn’t recommend for beginners to run multiple Dockers on the same machine, but if you have any of the applications mentioned, or even ones I haven’t mentioned, please note which application you are currently running, and when you use share with others.