Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Docker’s official packages for Ubuntu, Debian, and CentOS; use Docker Desktop for Windows. On Linux, remove distribution packages that conflict with Docker Engine, add Docker’s official APT or RPM repository, install the Engine packages, start the service when required, and verify with docker run hello-world. On Windows 10 or 11, install Docker Desktop with the WSL 2 or Hyper-V backend after checking virtualization, edition, and servicing requirements.

The commands below use Docker’s current installation model and include the security and troubleshooting details that commonly determine whether the first container starts successfully.

Choose the installation path

System Recommended method Container backend Important prerequisites
Ubuntu 22.04, 24.04, or 26.04 (64-bit) Docker’s APT repository Native Linux daemon Root access for installation; supported architecture
Debian Docker’s APT repository Native Linux daemon Use the matching Debian codename; derivatives may need adjustment
CentOS Docker’s RPM repository Native Linux daemon dnf, systemd, and root access
Windows 10/11 Docker Desktop installer WSL 2 or Hyper-V 64-bit CPU, virtualization, supported Windows build, and a supported edition

Docker recommends distribution packages or Docker Desktop for normal use. Static binaries require manual updates and are mainly intended for testing. Linux convenience scripts are also described as testing/development options rather than the normal production path.

Install Docker Engine on Ubuntu

1. Check the supported release and architecture

The current Ubuntu Engine instructions support 64-bit Ubuntu Resolute 26.04 LTS, Noble 24.04 LTS, and Jammy 22.04 LTS. Packages are available for amd64, armhf, arm64, s390x, and ppc64le.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

2. Remove conflicting packages

Distribution packages can conflict with Docker’s packages. Remove them before adding the official repository:

sudo apt remove docker.io docker-compose docker-buildx podman-docker containerd runc

If APT reports that one of these packages is not installed, continue; that is expected on a clean system.

3. Add Docker’s signing key and repository

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

4. Install Engine, Buildx, and Compose

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

5. Check the daemon and run the test container

sudo systemctl status docker
sudo docker run hello-world

The test command downloads a test image, runs it in a container, prints a confirmation message, and exits. A successful result proves that the client can reach the daemon and that the daemon can pull and start an image.

Install Docker Engine on Debian

1. Remove conflicting packages

sudo apt remove docker.io docker-compose docker-buildx podman-docker containerd runc

2. Configure Docker’s Debian APT repository

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/debian/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/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Architectures: $(dpkg --print-architecture)
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update

3. Install and verify

sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl status docker
sudo docker run hello-world

On Debian testing, or on a derivative such as Kali, the detected codename may not match a Docker repository suite. Docker’s guidance is to replace it with the corresponding Debian codename, such as trixie, before running apt update. Do not blindly use a derivative-specific codename if the repository does not publish it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Docker Engine on CentOS

1. Remove older or conflicting packages

sudo dnf remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine podman runc

2. Add Docker’s RPM repository

sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

3. Install the Engine packages

sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

4. Start Docker and enable it at boot

sudo systemctl enable --now docker

Installing the packages creates a docker group, but it does not add your user to that group. The package installation also does not start the daemon until the systemd command above runs.

5. Verify the installation

sudo docker run hello-world

Install Docker Desktop on Windows 10 or 11

Check Windows, hardware, and edition requirements

  • Windows 10 64-bit Enterprise, Pro, or Education 22H2 (build 19045), or Windows 11 64-bit Enterprise, Pro, or Education 23H2 (build 22631) or higher, within Microsoft’s servicing timeline.
  • A 64-bit processor with SLAT support, at least 8 GB of RAM, hardware virtualization enabled in firmware, and the WSL 2 feature when using WSL 2.
  • Windows containers require Pro or Enterprise. Home and Education editions support Linux containers only.

If virtualization is disabled, enable Intel VT-x or AMD-V in UEFI/BIOS before starting Docker Desktop. A machine that cannot provide SLAT or hardware virtualization cannot meet the WSL 2 backend requirements.

Interactive installation

  1. Download Docker Desktop Installer.exe from Docker’s Windows distribution.
  2. Run the installer and choose per-user or all-users installation.
  3. On the configuration page, select the WSL 2 or Hyper-V backend that matches your setup.
  4. Finish the wizard, start Docker Desktop, and wait until its status indicates that the engine is running.
  5. Open PowerShell and verify the client and engine:
docker version
docker run hello-world

Per-user mode installs to %LOCALAPPDATA%ProgramsDockerDesktop and does not require administrator privileges. All-users installation requires elevation.

Command-line installation

Run these from PowerShell in the directory containing the installer:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
# Per-user
Start-Process 'Docker Desktop Installer.exe' -Wait -ArgumentList 'install', '--user'

# All users (run PowerShell as administrator)
Start-Process 'Docker Desktop Installer.exe' -Wait install

Docker Desktop is the normal Windows and macOS distribution because it supplies the desktop application and the Linux or Windows container backend. Windows Home is suitable for Linux containers through WSL 2, not Windows containers.

Verify Docker and diagnose the daemon

Linux checks

  • docker version confirms that both the client and server sections can be queried.
  • sudo systemctl status docker shows whether the Linux daemon is active.
  • sudo docker run hello-world tests image download, container creation, execution, and exit.

Windows checks

  • docker version should show a client and server; a client-only result usually means Docker Desktop is not running or the selected backend is unavailable.
  • docker run hello-world provides the end-to-end test after Docker Desktop reports that it has started.

Run Docker without sudo on Linux

Docker’s documented post-installation setup adds your account to the docker group:

sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

A complete logout and login also refreshes group membership. Test with:

docker run hello-world

This convenience has a serious security consequence: membership in the docker group grants root-level privileges. Treat membership like access to root; only grant it to trusted users and services. If you do not want that privilege, keep using sudo docker ... or use a separately designed rootless setup rather than casually adding users to the group.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Docker starts at boot by default on Debian and Ubuntu. On other systemd distributions, enable both services explicitly:

sudo systemctl enable docker.service
sudo systemctl enable containerd.service

Docker Desktop for Linux: an optional alternative

Docker Desktop for Linux is available as .deb or .rpm packages for Ubuntu, Debian, RHEL, and Fedora on x86_64/amd64. It can coexist with Engine, but each installation may use a different daemon. Docker contexts select the target:

docker context ls
docker context use default
docker context use desktop-linux

Use default for the system Engine and desktop-linux for Docker Desktop’s daemon. Check the active context before diagnosing a missing image, volume, or container; resources belong to the daemon in which they were created.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Upgrades, reliability, and operational notes

Keep the repository-managed packages current

On APT systems, refresh package metadata and install available Docker package updates through APT. On CentOS, use dnf updates from Docker’s repository. Review package changes before applying them on production hosts, and verify again with docker version and docker run hello-world.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Know what a failed test means

  • “Cannot connect to the Docker daemon”: start Docker with sudo systemctl start docker on Linux, or launch Docker Desktop on Windows. Also check that the correct context is selected.
  • APT or DNF cannot find a package: confirm the repository URL, distribution codename, architecture, and that you ran the package-index refresh after adding the repository.
  • GPG or signature errors: verify that the key file exists at /etc/apt/keyrings/docker.asc, has readable permissions, and that the source uses its Signed-By entry.
  • Debian derivative fails during apt update: replace the derivative codename with the corresponding Debian suite, as described above.
  • Windows says virtualization is unavailable: enable firmware virtualization, confirm the Windows virtualization features, and reboot before retrying Docker Desktop.
  • Windows containers will not start on Home or Education: switch to Linux containers or use a Pro/Enterprise edition for Windows containers.
  • docker works only with sudo: log out and back in after changing group membership, or run newgrp docker. Remember the root-level privilege warning.
  • The expected container is missing: inspect docker context ls; Docker Desktop and the native Linux daemon have separate images, containers, and volumes.

Or skip the browser setup

If your Docker workflow also needs repeatable website screenshots, ScreenshotNeo is a direct HTTP API and MCP server for developers. It accepts consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies the result with X-Page-Verdict and X-Billed headers.

One request returns PNG, JPEG, WebP, or PDF. The same service supports full-page and element captures, lazy-image loading, device presets, retina scale, custom CSS and JavaScript, clicks, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, TTL-based caching, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

See the ScreenshotNeo documentation for parameter details. The API uses the following calls:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The free plan includes 1,000 screenshots each month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Frequently Asked Questions

Where can I see Docker daemon errors on a Linux host?

Use sudo journalctl -u docker.service for the daemon log, and add --since "30 minutes ago" to narrow the output.

How do I remove a user from the Docker group?

Run sudo gpasswd --delete USERNAME docker, then log out and back in. The change removes the account’s root-level Docker access.

How can I see which Docker context a script will use?

Run docker context show; it prints the active context name. Use docker context ls to inspect all available daemons.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.