How to Install and Set Up Docker on Windows, Mac, and Linux: Step-by-Step Guide


Docker installation on all platforms

Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. This guide will walk you through the installation and setup process for Docker on Windows, Mac, and Linux.



Before installing Docker, ensure your system meets the following requirements:

  • Windows: Windows 10 64-bit: Home or Pro 21H2 or higher, or Enterprise or Education 21H2 or higher. WSL 2 backend.
  • Mac: macOS version 11 or newer. (Big Sur, Monterey, or Ventura). At least 4 GB of RAM.
  • Linux: A 64-bit version of a supported Linux distribution (e.g., Ubuntu, Debian, Fedora, CentOS).


  1. Download Docker Desktop: Visit the official Docker website and download the installer for Windows.
  2. Run the Installer: Double-click the downloaded file and follow the installation prompts. Ensure you enable the WSL 2 feature if prompted.
  3. Launch Docker Desktop: Once installed, launch Docker Desktop from the Start menu. It might take a few minutes to start the Docker Engine.


  1. Download Docker Desktop: Go to the official Docker website and download the installer for macOS (choose Apple Chip or Intel Chip).
  2. Run the Installer: Open the downloaded .dmg file and drag the Docker icon to the Applications folder.
  3. Launch Docker Desktop: Once installed, you can use Docker from the Terminal application after launching Docker Desktop from the Applications folder.


  1. Set up the repository: Update the `apt` package index and install packages to allow `apt` to use a repository over HTTPS.
  2. sudo apt-get update
    sudo apt-get install \
        ca-certificates \
        curl \
        gnupg
  3. Add Docker's official GPG key:
  4. sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
  5. Set up the repository:
  6. echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
      $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  7. Install Docker Engine:
  8. sudo apt-get update
    sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin


After installing Docker, you should verify that it is running correctly:

  1. Run the Hello World container: Run the following command in your terminal or command prompt:
  2. docker run hello-world
  3. Check Docker Version: Run the following command to check the installed version:
  4. docker --version


Congratulations! You have successfully installed and set up Docker on your system. You can now start using Docker to build and run containerized applications.



Explore our collection of useful resources and downloads to enhance your experience:

  • Docker Documentation: Access the official Docker documentation for more advanced features.
  • Docker Hub: Find and share container images on Docker Hub.

FAQ


Q: Is Docker free to use?
A: Docker Desktop is free for small businesses, personal use, education, and non-commercial open source projects. A paid subscription is required for professional use in large enterprises.


Q: How do I uninstall Docker?
A: You can uninstall it through the Apps & features on Windows, by moving it to Trash from the Applications folder on Mac, or using your package manager on Linux.


Read Next


Subscribe to Our Newsletter

Get the latest updates and exclusive content delivered to your inbox!