How to Install Docker on Windows, Mac, & Linux: A Step-By-Step Guide

Read it in 9 Mins

Last updated on
07th May, 2021
18th Sep, 2019
How to Install Docker on Windows, Mac, & Linux: A Step-By-Step Guide

Docker is intended to benefit developers and system managers and makes it a component of a number of toolchains for DevOps (developers + activities). This implies that designers can concentrate their attention on writing code without worrying about the scheme that it will eventually run on. It also gives them the opportunity to take advantage of one of the thousands of programs intended to operate as part of their implementation in a container at Docker. Docker offers flexibility for the operational team and decreases possibly a smaller overhead footprint and lower overhead the number of devices required.

Let’s now deep dive into installation steps for docker on different platforms.

Install Docker on Windows 

The community version of Docker for Microsoft Windows is Docker Desktop for Windows.Download from Docker Hub

System Requirements

The software and hardware requirements need to operate Client Hyper-V on Windows 10 effectively are:

Software Requirements:

  • Windows-10 64-bit system requirements: Pro, Enterprise or Education
  • Windows characteristics of Hyper-V and Containers must be activated

Hardware Requirements:

  • The support for virtualization of hardware-level Client Hyper-V in BIOS settings must be allowed with the 64-bit processor with second-level address translation (SLAT). 
  • Minimum 4 GB RAM

To run Docker Desktop, Microsoft Hyper-V is needed. The Windows installer Docker Desktop allows Hyper-V and restarts your computer if needed. VirtualBox no longer operates when Hyper-V is activated. All VirtualBox VM images are however maintained.

The DOCKer VMs (including the default one generated during the installation of the Toolbox) are no longer started. VirtualBox The Docker desktop can not use these VMs side-by-side. You can still handle remote VMs using the docker.

What is included in Installation?

The installation of Docker Desktop consists of the Docker Engine, Docker CLI, Docker Compose, Docker Machine, and Kitematic. Docker Desktop containers and images are shared among all user accounts on the machines where they are installed. All Windows accounts are building and running containers using the same VM. Nested virtualization situations, such as operating Docker Desktop with VMWare or Parallels, might operate. See Running Docker Desktop in nested situations for more data.

Installation steps 

  1. To run the installer, double-click Docker Desktop Installer.exe to install Docker Desktop on Windows. The installer can be accessed from Docker Hub if you have not previously downloaded (Docker Desktop Installer.exe). It typically downloads to your download directory or can be executed at the bottom of your internet browser from the latest download bar.
  2. Follow the installation wizard directions for licensing, authorizing the installer and proceeding with the installation. If advised, authorize your system password during the installation of the Docker Desktop Installer. The networking elements, connections to the applications of Docker and the management of Hyper-V VMs need to be privately accessible.
  3. Click Finish in the setup window and launch the application Docker Desktop.

Start Docker Desktop

After installation, Docker Desktop will not begin automatically. Search for Docker and select the search outcomes for Docker Desktop.

Docker Desktop app

If the whale icon remains stable in the status bar, Docker Desktop is up and running and can be accessed from any terminal window.

Docker Status Bar

You also get a pop-up message with the next steps, as well as a link to this documentation, after the Docker Desktop app is installed.

Docker Desktop app

When you're done initializing, click on the whale icon in the Notifications region and pick About Docker to check that your recent version is available.

Install Docker on Mac

The very first step is to download the Docker Toolbox for Mac. Get the downloadable link- Download from Docker Hub

System Requirement

Docker Desktop for Mac starts only when all these requirements can be met:

  1. Mac hardware must be 2010 models or newer, including Extended Page Tables (EPT) and Unrestricted Mode, with Intel hardware to provide memory management unit (MMU) virtualization. 
  2. This support can be checked to see if the following command is being run on your computer: sysctl kern.hv_support
  3. macOS Sierra 10.12 and newer versions of macOS are endorsed. The upgrade to the newest version of macOS is recommended.
  4. VirtualBox (incompatible with Docker Desktop on Mac) before version 4.3.30 must not be installed. It's alright if you have a newer VirtualBox version installed.

Installation steps

  • Double-click Docker.dmg and drag the whale Moby to the application folder to open the installer.

Installation steps in Docker

  • In the Applications directory, double-click to launch Docker. In the instance below, the applications folder is in the Grid view mode

Installation steps in Docker

You are led to allow with your system password after starting it. Privileged access is required to install Docker app connections and networking elements.

  • The whale in the top status bar shows that Docker runs from a terminal and is available.

Docker status bar

  • You will also get a success message, with the next steps and a link to this documentation, if you have just installed the app. To reject this pop-up, click on the whale in the status bar.

Installation steps in Docker

  • To get Preferences and other options, click on the whale (whale menu).
  • To check that you have the latest version, select About Docker.


  • Getting started provides an overview of Docker Desktop for Mac, basic Docker command examples, how to get help or give feedback, and links to all topics in the Docker Desktop for Mac guide.
  • Troubleshooting describes common problems, workarounds, how to run and submit diagnostics, and submit issues.

Install Docker on Linux

Let’s use a Ubuntu example to begin installing Docker. If you don't already have it, you can use Oracle Virtual Box to install a virtual Linux example. A straightforward Ubuntu server mounted on the Oracle Virtual Box is shown in the following screenshot. There is an OS user called a demo defined with full root access to the scheme:

Install Docker on Linux

Step 1 − We must first make sure you have the correct version of the Linux kernel running before installing Docker. Only version 3.8 or greater is intended for Docker on Linux kernel. We can do this with the instructions below.

Uname: The system data for the Linux system is returned by this method. This method will return the kernel name, kernel release, kernel version information on the Linux system.

uname -a

a − Used for ensuring the return of the system data.

Install Docker on Linux Step 1

Step 2 − You need to install packages from the internet onto the Linux system via the following command, the recent packages can be updated to the OS.



sudo− The sudo command is used to make sure the command runs with root access.

update− Update option ensures that all packages on the Linux system are updated.

sudo apt-get update
Install Docker on Linux Step 2

Step 3- The next step is to install the certificates needed to later download required Docker packages for a job with the Docker site. The following command can be used.

sudo apt-get install apt-transport-https ca-certificates
Install Docker on Linux Step 3

Step 4− Adding fresh GPG key will be the next step. This key must guarantee that the required packages for Docker are all encrypted.

This command is intended to download the key from hkp:/ and add it to the adv keychain by means of the ID58118E89F3A912897C070ADBF76221572C52609D. Please note that to download the necessary Docker packages, this specific key is needed.

Install Docker on Linux Step 4

Step 5 − Next, you need to add the appropriate site to docker.list of the apt package manager, depending on the version of Ubuntu which you hold, to allow it to detect and download the Docker packages from the Docker site.

echo "deb ubuntu-trusty main” 
   | sudo tee /etc/apt/sources.list.d/docker.list

Install Docker on Linux Step 5

Step 6 –The next step is to update the packages on Ubuntu scheme with the apt-get update command.

Install Docker on Linux Step 6

Step 7 ‐ if we want to make sure that the package manager points towards the correct repository then we can do this by issuing the apt-cache command.

apt-cache policy docker-engine

Install Docker on Linux Step 7

Step 8– Edit the update command apt-get to guarantee that all local system packages are up-to-date.

Install Docker on Linux Step 8

Step 9- The Linux-image-extra-* kernel packages that allow the user to use the aufs storage driver are required for Ubuntu Trusty, Wily and Xenial. The newer variants of Docker use this engine.

The following command can be used:

sudo apt-get install linux-image-extra-$(uname -r) 

Install Docker on Linux Step 9

Step 10− Installing Docker is the final step and this can be done with the following command:

sudo apt-get install –y docker-engine

Here, apt-get utilizes the installation feature to download and install Docker from the Docker page. The Docker engine is the official package for Ubuntu based devices by the Docker Corporation.

Install Docker on Linux Step 10

The docker running version can be checked by running below command:

docker version

Docker Running Version


Ashish Kumar

Senior Technology Specialist

Ashish is working as a Senior Technology Specialist in leading financial bank has more than 13 years of experience in developing enterprise applications