...

/

Install Docker on Ubuntu, macOS, and Windows

Install Docker on Ubuntu, macOS, and Windows

Learn how to install Docker on MacOs, Windows, and Ubuntu machines.

Install Docker

Before learning to install Docker, it’s important to understand previous Docker editions. People new to Docker are frequently confused about Docker’s editions due to references to these editions in blog posts.

In the past, Docker offered two editions: the Docker Community Edition (Docker CE) and the Docker Enterprise Edition (Docker EE). The Docker Enterprise Edition was a premium version of the Community Edition that included additional features to help enterprises efficiently manage, launch, and secure their container workloads.

Mirantis acquired Docker Enterprise Edition in late 2019, leaving Docker with Docker Community Edition, known as the Docker Engine.

Docker release channels

Docker manages its releases via three channels: stable, test, and nightly. The stable release channel contains the most recent stable releases that are available for public use. Most people use the stable release channel.

However, there may be times when we’d like to try out some new features that haven’t yet been released. The test release channel serves this purpose because it contains release candidates or beta versions available for testing before public release.

If we’re a Docker contributor or want to keep track of works-in-progress for the next major release, nightly is the release channel to use. The nightly release channel allows us to test the most recent master branch code. We should be aware that this is the least stable channel of release.

We should install Docker from the stable channel if we want a stable version.

In the following section, we look at how to install Docker on an Ubuntu operating system.

Install Docker on Linux

Docker is native to Linux. Regardless of our preferred distribution, we’re able to run Docker if we have a 64-bit installation and a kernel version 3.10 or higher. We can check our Linux kernel version by running the following command:

Press + to interact
uname -r

We can install Docker on our Linux machine in three ways:

  • Install Docker from the official repository.
  • Install Docker from a software package.
  • Install Docker using convenience scripts.

In this course, we’ll learn to install Docker on Ubuntu using each method listed above.

Option 1: Install Docker from the official repository

Of the three ways to install Docker on Linux, this is the recommended method because it ensures we always get a stable and up-to-date version of Docker.

If we’re installing Docker for the first time on a new Ubuntu machine with this option, we first need to set up a Docker repository on our machine. We only need to do the setup once, and after, we can install Docker and update it from the same repository.

To set up a Docker repository, we follow the steps below:

  1. We open a Unix shell on our Ubuntu machine.
  2. We update the apt index by running the command below:
sudo apt-get update
  1. The apt index verifies the signature of packages we download to ensure they haven’t been tampered with. As an add-on, we can allow apt to use the repository over HTTPS.
...