DEV Community

Ákos Takács
Ákos Takács

Posted on

Which Docker variant am I using and where is the daemon running?

Introduction

People often install Docker CE and Docker Desktop when they only want to have the Desktop. Then they actually try to connect to the wrong daemon. I wrote about the different kind of Docker installations in "You run containers, not dockers - Discussing Docker variants, components and versioning"

So sometimes you want to know which Docker variant you are running. Maybe you don't remember, or accidentally enabled an option while installing the host operating system, or someone else installed Docker and you had to take over the project. When you ask a question on the official Docker Community Forums, we also need to know which one you are using, since the cause of an issue and the solution could be completely different.

You can find out which Docker you installed, but first you need to know what operating system you are using and what package managers it supports. Then you need to know how you can list the installed packages, using the supported package managers and listing processes can help too.

In this post I try to summarize the different kind of Docker installations and how you can tell which variant you have.
You can also have one that I don't write about in this post, but I hope you can use the methods to discover what you or anyone else installed before.

Table of contents

Docker Engine on Linux

The number of dockerd processes running directly on Linux

» Back to table of contents «

When using the Docker Engine on Linux directly, based on the Moby project, you can run

pidof dockerd
Enter fullscreen mode Exit fullscreen mode

That should show a single number, the process id of the Docker daemon. If you get none, then the Daemon is either not running, or you most likely run the daemon on a remote machine or in a virtual machine. It is less likely, but it is also possible that you found another non-official way to install Docker, and the daemon executable has a different name. Then you need to find the maintainer of that Docker daemon and ask for their help.

If you get multiple process IDs, that means you have multiple Docker daemons running, which is most likely by accident. You should run only one Docker daemon, unless you are really experienced, and you know how to make sure that these daemons are using different sockets, data directories and iptables rules (or it is enabled only for one daemon).

Docker as a Snap package

» Back to table of contents «

When Docker is installed as a Snap package on Linux, the following command can be used:

snap list docker
Enter fullscreen mode Exit fullscreen mode

If you get an error message, you either have no snap package manager at all, or Docker is not installed as a snap package. Otherwise, you would get something like the following:

Name    Version  Rev   Tracking       Publisher   Notes
docker  27.2.0   2964  latest/stable  canonical✓  -
Enter fullscreen mode Exit fullscreen mode

The exact output can be different depending on the version you have. Then you can find the process in the process list using the following command:

ps aux | grep dockerd | grep snap
Enter fullscreen mode Exit fullscreen mode

If the Docker daemon installed as a Snap package is also running, you will get an output like below:

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

Docker installed using the default package manager of the Linux distribution

Docker on Debian-based Linux distributions

» Back to table of contents «

On Debian-based Linux distributions, you can use dpkg to find out if Docker was installed as an APT package.

dpkg -l 'docker*' | grep '^ii'
Enter fullscreen mode Exit fullscreen mode

The output would be something 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.
Enter fullscreen mode Exit fullscreen mode

Recent APT versions also support the below command:

apt list --installed 'docker*'
Enter fullscreen mode Exit fullscreen mode

Then the output would be similar to the one below:

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]
Enter fullscreen mode Exit fullscreen mode

The above outputs show that I installed the Docker CE package. If you installed docker.io instead, you would get one of the outputs below:

ii  docker.io         26.1.3-0ubuntu1~24.04.1 arm64        Linux container runtime
Enter fullscreen mode Exit fullscreen mode

or

Listing... Done
docker.io/noble-updates,now 26.1.3-0ubuntu1~24.04.1 arm64 [installed]
Enter fullscreen mode Exit fullscreen mode

Docker on Red Hat-based Linux distributions

» Back to table of contents «

Red Hat-based Linux distributions might use dnf or yum. Then you can search for packages by running the following commands:

dnf list --installed 'docker*'
# or
yum list --installed 'docker*'
Enter fullscreen mode Exit fullscreen mode

Find non-snap dockerd processes on Linux

» Back to table of contents «

Regardless of the package manager and the exact package, you can get the docker daemon process in the terminal:

ps auxf | grep dockerd | grep -v 'snap\|grep'
Enter fullscreen mode Exit fullscreen mode

And you would 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 like 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
Enter fullscreen mode Exit fullscreen mode

You have Rootless Docker, which just means the daemon is running as your non-root user also using a different socket and Docker data dir.

Docker Desktop

Docker Desktop on Linux

» Back to table of contents «

Docker Desktop can be installed on Linux, macOS and Windows (except Windows Server), so the way to find the process in a process list could be different, but in this post I focus on Linux, because that is where most of you can be confused by the multiple ways to install Docker.

If you have Docker Desktop installed on Linux, the following command would reveal it to you:

ps aux | grep docker-desktop | grep -v grep
Enter fullscreen mode Exit fullscreen mode

The 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}
Enter fullscreen mode Exit fullscreen mode

On a Linux, which supports ps -f to get a tree of processes, you can try the following:

ps auxf | grep docker-desktop | grep -v grep
Enter fullscreen mode Exit fullscreen mode

And the 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
Enter fullscreen mode Exit fullscreen mode

If the virtual machine is running too, you will see the following as well:

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
Enter fullscreen mode Exit fullscreen mode

Docker Desktop on macOS

» Back to table of contents «

You don't have as many ways to install Docker on macOS as you have on Linux, but you could still have Docker Desktop or Rancher Desktop, or you could have only the client while managing a remote Docker daemon ona remote server. so it cans till be useful to find out if Docker Desktop os installed. Of course, on macOS, you would also have the whale icon at the top of the screen, but for those who prefer the terminal, or in case the icon is not shown, the below command can tell you if Docker Desktop is running:

ps aux | grep Docker.app | grep -v grep
Enter fullscreen mode Exit fullscreen mode

The output is quite long, but you would find the below part as well:

/Applications/Docker.app/Contents/MacOS/Docker Desktop.app/
Enter fullscreen mode Exit fullscreen mode

Docker.app is also the name of the application that you can look for on your Mac if the Desktop is not running, but you want to know if it is installed or not. Since the app name can be changed in a future release, searching for docker in the terminal instead of Docker.app can also be enough, but you may have a virtual machine or any folder appearing in the process list even if it is not for Docker Desktop.

Docker Desktop on Windows

» Back to table of contents «

On Windows, you can use the "Task Manager" desktop app or run the following command in PowerShell:

Get-Process | Select-String docker
Enter fullscreen mode Exit fullscreen mode

The application on Windows is called "Docker Desktop"

Docker Contexts

» Back to table of contents «

You can also check what contexts are configured for the Docker client. Regardless of which Docker you are using, the client is most likely using the same $HOME/.docker folder which contains information about the contexts. Although this directory can be changed, I don't remember any client changing it, except when I made a video for which I wrote a script to do it. The following command can list all the contexts you have:

docker context ls
Enter fullscreen mode Exit fullscreen mode

The output could 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
Enter fullscreen mode Exit fullscreen mode

The active context (which you are using when running docker commands) is the one with the "*" character on the right side of the context name.

The endpoint of the default is usually the following unix Domain socket (on Linux and macOS): unix:///var/run/docker.sock.

Just because you see a local unix socket, it doesn't necessarily mean, you are using a local daemon directly on the host, although usually that is the case.
So the default context is usually for the Docker Engine running directly on the host.

Now then notice the "desktop-linux" context which 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 the default context with the default endpoint depending on how you installed it.
You always need to check the context name and the description as well. If you don't know what that means, you can still ask the community, but make sure you search for it first.

You can also notice the "rootless" context. Anyone could name a context "rootless", but this is usually the rootless version of Docker CE. That means, that you are most likely have Docker CE, or at least a Docker that runts directly on your Linux host.

Remote Docker daemon

» Back to table of contents «

Sometimes you have the client on your local machine, but the daemon is not just in a virtual machine, but in a remote machine over which you have no control at all. If you control that remote machine, you most likely know about it, but some CI/CD tools like CircleCI can support a Docker Engine which is not directly running in your environment. People often notice it when they try to access containers using their IP addresses, and it doesn't work. The same problem occurs when you use Docker Desktop since Docker Desktop runs the Docker daemon in a virtual machine, but another case can be when your processes run in a container while the Docker daemon is running either on the host or more likely in another container or a remote Docker host. Whether it is a virtual machine or physical machine is irrelevant.

If you are not the one who installed Docker and you don't even control the environment, but you paid for an online service, always rad the documentation and ask their support or community whenever it is possible.

Conclusion

» Back to table of contents «

Maybe you have Rancher Desktop which could use docker as container Engine, or you could have Podman or Podman Desktop, which are really not Docker, but the method is the same.

  • You use the package manager to list installed packages filtered to the name of the software
  • or try to look for it in the process list,
  • or use docker context ls to learn about Docker contexts which can help you find out which Docker daemon you are trying to connect to.

If the operating system is not Linux, you can still use the tools supported by the operating system to list running processes and installed apps. I would not recommend running multiple Docker on the same machine for beginners, but if you have any of the mentioned apps or even something I haven't mentioned, be aware of which one you are running at the moment and share it with people when you need help from them.

Top comments (0)