Installing Docker Engine and Docker Desktop
Docker Engine on a Linux server from Docker's apt repository, Docker Desktop on a laptop, what each one actually installs, and the post-install traps.
Installing Docker Engine and Docker Desktop
The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.
Not started
What you'll learn
- Docker Engine is the free, open-source daemon, CLI and plugins for Linux. Docker Desktop is a product for Mac, Windows and Linux that runs an Engine inside a VM with a GUI on top.
- On a server, install Engine from Docker's own apt or dnf repository, not the distribution's docker.io package and not the convenience script.
- The repository install is five packages: docker-ce, docker-ce-cli, containerd.io, docker-buildx-plugin and docker-compose-plugin.
- Adding a user to the docker group lets them run docker without sudo, and also gives them root on the machine.
- Docker Desktop on Linux runs its own VM and switches the CLI to a context called desktop-linux, so it doesn't see the containers of an Engine installed on the same host.
- Docker Desktop is free for personal use, education and small businesses under 250 employees and $10 million in revenue. Larger companies need a paid subscription.
Two products with one name
“Install Docker” means two different things. On a Linux server it means Docker Engine: the daemon, the CLI and some plugins, installed as ordinary packages and managed by systemd. On a laptop it usually means Docker Desktop: an application that runs a Linux VM, puts an Engine inside it, and adds a GUI, file sharing, Kubernetes, extensions and updates. Mixing them up causes most first-day confusion, so pick by where the containers will run.
Docker Engine on a Linux server
Docker’s docs list three ways in: Docker’s apt (or dnf) repository, downloading .deb files by hand, and the convenience script at get.docker.com. Use the repository. The script is meant for test machines, and the distribution’s own docker.io package lags behind. On Ubuntu 26.04 today, docker.io is 29.1.3 while Docker’s repository has 29.10.1.
The repository setup from Docker’s Ubuntu page now writes a deb822 .sources file rather than the older one-line format:
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: https://download.docker.com/linux/ubuntu
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Signed-By ties this repository to Docker’s key only, the pattern from the Linux lesson on third-party repositories. Before installing, the docs say to remove conflicting packages: docker.io, docker-compose, docker-compose-v2, docker-doc, docker-buildx, podman-docker, and any separate containerd or runc, since containerd.io bundles both.
I downloaded the resolute package index from Docker’s repository to see what those five names are today:
docker-ce 5:29.10.1 dockerd, docker-proxy, docker-init, systemd units
docker-ce-cli 5:29.10.1 docker
containerd.io 2.4.2 containerd, containerd-shim-runc-v2, ctr, runc
docker-buildx-plugin 0.39.1 docker buildx (and the builder behind docker build)
docker-compose-plugin 5.8.1 docker compose
The packages enable and start docker.service. Check it with sudo systemctl status docker, then sudo docker run hello-world. docker version prints two sections, Client and Server. If the Server half is an error, the CLI is installed but can’t reach the daemon. On Fedora, RHEL and its rebuilds the steps are the same with dnf and a .repo file. Engine 29.10 added packages for AlmaLinux, Oracle Linux and Rocky Linux.
The docker group
Out of the box only root can use the socket, so every command needs sudo. The post-install page shows the usual fix:
sudo usermod -aG docker "$USER"
# log out and back in, or: newgrp docker
docker run hello-world
The same page puts a warning above it: the docker group grants root-level privileges. The packaged docker.socket unit sets the socket to 0660 root:docker, and anyone who can write to it can start a container with the host’s / mounted. Treat group membership like a sudoers entry. The docs now also describe a password-gated alternative with newgrp, and rootless mode runs the daemon itself as an ordinary user.
One more trap: if you ran docker with sudo before joining the group, ~/.docker/ may be owned by root and you’ll see “Error loading config file … permission denied”. Fix the ownership with chown.
Docker Desktop
On macOS and Windows there is no Linux kernel, so Desktop is the usual route. It runs a small Linux VM (WSL 2 or Hyper-V on Windows, Apple’s virtualization framework on a Mac), runs Engine inside it, and points your CLI at it. Settings control the VM’s CPU, memory and disk. A container’s memory limit can never exceed what the VM was given.
Docker Desktop for Linux exists too, and it surprises people: it also runs a VM, for consistency across platforms and to keep containers away from the host. Per Docker’s Linux install page, it creates a context named desktop-linux and makes it current. If Engine is also installed, the two are separate daemons with separate containers and images:
docker context ls # default → /var/run/docker.sock, desktop-linux → ~/.docker/desktop/docker.sock
docker context use default # back to the host's Engine
Licensing differs as well. Engine is open source. Docker Desktop is free for personal use, education, non-commercial open source and businesses with fewer than 250 employees and under $10 million in annual revenue. Professional use in larger organizations needs a paid plan. That’s the main reason companies look at the alternatives.
About the video
The embed is all of ProgrammingKnowledge’s “How To Install Docker on Ubuntu 26.04 LTS (Linux)”, August 2026, 7 minutes. Its chapters are preparation and cleanup, Docker repository setup, verifying the installation and post-installation configuration, which is the official repository method above on the current Ubuntu LTS. It’s Ubuntu only and doesn’t cover Docker Desktop, the docker group’s security cost or Desktop’s separate context. English was judged from its “English (US) original” audio track. Bret Fisher’s video in deeper explains why Desktop is not just Engine plus a CLI and how he sets it up.
What was run: Docker’s resolute package index was downloaded and parsed for current versions, the three main packages were unpacked to list their files and read docker.socket, and Ubuntu’s docker.io version was read from packages.ubuntu.com. Nothing was installed. The install commands and the Desktop and licensing details are from docs.docker.com, checked 2026-11-28.
Where this fits
Engine and Desktop aren’t the only way to run containers. Next: Docker alternatives.
Check yourself
Why install from download.docker.com instead of Ubuntu's docker.io package?
Docker's repository tracks current Engine releases and ships the Buildx and Compose plugins as matched packages. The distribution package lags behind (29.1.3 against 29.10.1 on Ubuntu 26.04 at the time of writing) and uses different package names.
You added yourself to the docker group but still get 'permission denied' on the socket. What did you forget?
Group membership is read at login. Log out and back in, or run newgrp docker, so the shell picks up the new group.
A teammate installs Docker Desktop on a Linux server that already runs Engine, and docker ps suddenly shows nothing. Why?
Desktop switched the CLI to its desktop-linux context, which talks to the daemon in Desktop's VM. docker context use default points it back at the host's Engine.
Why is giving a CI user membership in the docker group a security decision?
The group can write to the Docker socket, and anyone who can talk to the root daemon can start a privileged container that mounts the host's filesystem. It is equivalent to root.
Go deeper
Notes
Notes are saved to your account.
Everything else on this page works without one — progress and bookmarks keep themselves in this browser and come with you when you sign in. Notes are the one thing worth not trusting to a browser you might clear.
Your notes could not be loaded.