๐Ÿณ How to Install Docker on Windows, Linux, and Mac

Ajaikrishna SAjaikrishna S
3 min read

Step-by-step guide to get Docker running on your system in just a few minutes.

๐Ÿ”ง What You'll Learn

In this guide, weโ€™ll walk through how to install Docker on:

  • โœ… Windows 10/11

  • โœ… Linux (Ubuntu)

  • โœ… macOS (Intel or Apple Silicon)

Whether youโ€™re building apps, learning DevOps, or exploring containers, this setup is your first step into Docker.

๐Ÿ’ป What is Docker Again?

Docker is a platform that lets you package apps into containers โ€” lightweight, portable environments that run the same anywhere.
To run Docker, you need to install Docker Desktop or the Docker Engine based on your OS.

๐ŸชŸ Installing Docker on Windows 10/11

โœ… Prerequisites:

  • Windows 10 or 11 (64-bit, Pro/Enterprise or WSL2 support on Home)

  • WSL2 backend enabled (for Windows Home)

  • ๐Ÿ›  Steps:

    1. Download Docker Desktop
      ๐Ÿ”— Get it from here

    2. Run the Installer
      Follow the installation wizard. Check the option to use W**SL2 backend**.

    3. Restart your PC (if prompted)

    4. Verify Installation
      Open Command Prompt or PowerShell and type:

       docker --version
      

5. Run a Test Container

    docker run hello-world

โœ… Youโ€™re good to go! ๐ŸŽ‰

๐Ÿง Installing Docker on Linux (Ubuntu Example)

โœ… Prerequisites:

  • Ubuntu 20.04+ or similar Debian-based distro

  • sudo access

๐Ÿ›  Steps:

  1. Update packages

     sudo apt update && sudo apt upgrade
    
  2. Install required packages

     sudo apt install ca-certificates curl gnupg lsb-release
    
  3. Add Dockerโ€™s GPG key

     curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker.gpg
    
  4. Set up the Docker repo

     sudo apt update
     sudo apt install docker-ce docker-ce-cli containerd.io
    
  5. Install Docker Engine

     sudo apt update
     sudo apt install docker-ce docker-ce-cli containerd.io
    
  6. Verify Installation

     docker --version
     docker run hello-world
    

๐ŸŽ‰ Docker is now running on your Linux box!

๐Ÿ Installing Docker on macOS (Intel & M1/M2)

โœ… Prerequisites:

  • macOS 11+ (Big Sur or newer)

  • Intel or Apple Silicon (M1/M2 chip)

๐Ÿ›  Steps:

  1. Download Docker Desktop for Mac
    ๐Ÿ”— Download Here

  2. Install the app

    • Drag Docker.app into your Applications folder
  3. Run Docker Desktop

    • On first launch, give it necessary permissions
  4. Verify Installation Open Terminal and type:

     docker --version
     docker run hello-world
    

โœจ You're now ready to containerize on macOS!

๐Ÿง  Pro Tip: Use Docker Compose

Once Docker is set up, try Docker Compose to manage multi-container apps:

docker compose version

If not installed, it usually comes bundled with Docker Desktop.

๐Ÿ Final Thoughts

Installing Docker is your first step toward mastering modern development, automation, and deployment.

In upcoming posts, weโ€™ll show how to:

  • Create your first Dockerfile

  • Build and run a custom app in Docker

  • Share containers with others

0
Subscribe to my newsletter

Read articles from Ajaikrishna S directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ajaikrishna S
Ajaikrishna S