Unlock Your Python Backend Career: Build 30 Projects in 30 Days. Join now for just $54

Introduction to Docker

How to install Docker

How to install Docker

Docker is one of the easiest applications to install on your local machine.

However, it depends greatly on the operating system your local machine is running on and I hope its Mac 😎

Nevertheless, Docker runs flawlessly on all major operating systems such as Mac, Windows, and Linux with Mac being the easiest. We will learn to install Docker on these three major operating systems.

Install Docker on Mac

To install Docker on Mac, simply go to the Docker Download page and download the latest version of Docker. Click on the Download for Mac (stable) button for Mac.

After downloading successfully, you will get an Apple Disk Image file which you can open and click on the application file to start the installation. All you have to do is drag the file and drop it in your Applications directory.

drag and drop docker directoryYou can start Docker by simply double-clicking the application icon. Once the application starts, you'll see the Docker icon appear on your menu bar.

Docker Menu IconNow, open up the terminal and execute docker --version and docker-compose --version to ensure the success of the installation.

Install Docker on Windows

Installing Docker in Windows is almost the same with only a few changes and extra steps that you’ll need to go through. The installation steps are as follows:

  1. Visit this site and follow the instructions for installing WSL2 on Windows 10 or later.

  2. Then go to the official download page and click the Download for Windows (stable) button.

  3. Double-click the downloaded installer and go through the installation with the defaults.

Once the installation is done, click Docker Desktop either from the start menu or your desktop to start the Docker engine. The docker icon should show up on your taskbar.

Docker running statusLastly, open up Ubuntu or whatever distribution you've installed from Microsoft Store. Execute the docker --version and docker-compose --version commands to make sure that the installation was successful.

docker version checkYou can access Docker from your regular Command Prompt or PowerShell as well.

Install Docker on Linux

Installing Docker in Linux is a bit different because Linux has different distributions and each comes with different installation files and processes.

Also, when you install the Docker Desktop package on Windows or Mac, it comes with a collection of tools like Docker EngineDocker ComposeDocker DashboardKubernetes, and a few other goodies.

However, on Linux, you don’t get such a bundle. Instead, you install all the necessary tools you need manually. Installation procedures for different distributions are as follows:

If you follow the instruction for Ubuntu, once the installation is done, open up the terminal and execute docker --version and docker-compose --version to ensure the success of the installation.

Docker Linux version checkNow that we have installed Docker, let’s look at how to dockerize a JavaScript application with Docker.

Whenever you're ready

There are 4 ways we can help you become a great backend engineer:

The MB Platform

Join 1000+ backend engineers learning backend engineering. Build real-world backend projects, learn from expert-vetted courses and roadmaps, track your learnings and set schedules, and solve backend engineering tasks, exercises, and challenges.

The MB Academy

The “MB Academy” is a 6-month intensive Advanced Backend Engineering BootCamp to produce great backend engineers.

Join Backend Weekly

If you like post like this, you will absolutely enjoy our exclusive weekly newsletter, Sharing exclusive backend engineering resources to help you become a great Backend Engineer.

Get Backend Jobs

Find over 2,000+ Tailored International Remote Backend Jobs or Reach 50,000+ backend engineers on the #1 Backend Engineering Job Board