background

Installing Docker

Last updated June 15, 2023

DevOps

Installing Docker

Before you can start using Docker, you need to install Docker Desktop (for Windows and Mac) or Docker Engine (for Linux). This guide covers installation steps for different operating systems.

System Requirements

Make sure your system meets these minimum requirements:

  • Windows: 64-bit Windows 10 Pro, Enterprise, or Education
  • Mac: macOS 10.14 (Mojave) or newer
  • Linux: Ubuntu 20.04+, Debian 10+, Fedora 32+, or CentOS 8+

Windows Installation

  1. Download Docker Desktop for Windows from the Docker website
  2. Double-click the installer and follow the installation wizard
  3. When prompted, enable WSL 2 (recommended) or Hyper-V
  4. Launch Docker Desktop after installation
  5. Verify installation by running docker --version in Command Prompt or PowerShell

Mac Installation

Intel Chip

  1. Download Docker Desktop for Mac (Intel chip) from the Docker website
  2. Drag the Docker icon to your Applications folder
  3. Launch Docker Desktop from Applications
  4. Verify installation by running docker --version in Terminal

Apple Silicon (M1/M2)

  1. Download Docker Desktop for Mac (Apple Silicon) from the Docker website
  2. Drag the Docker icon to your Applications folder
  3. Launch Docker Desktop from Applications
  4. Verify installation by running docker --version in Terminal

Linux Installation (Ubuntu)

  1. Update package index:
    sudo apt-get update
    
  2. Install prerequisites:
    sudo apt-get install ca-certificates curl gnupg lsb-release
    
  3. Add Docker's official GPG key:
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
    
  4. Set up the stable repository:
    echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  5. Install Docker Engine:
    sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io
    
  6. Verify installation:
    sudo docker run hello-world
    

Post-Installation Steps

Run Docker without sudo (Linux only)

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

Configure Docker to start on boot (Linux only)

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

You've now successfully installed Docker! In the next section, we'll explore Docker's basic commands and how to run your first container.

Enjoyed the read? Help us spread the word — say something nice!

Guide Parts

logo
© 2025 Guidely. All rights reserved.