Skip to content

How to install Docker

Rui P. Ribeiro edited this page Mar 13, 2023 · 3 revisions

On Linux

Step 1 - Installing Docker

In order to guarantee that we obtain the most recent version of Docker, we will install it from the official Docker repository instead of relying on the Docker installation package provided by the official Ubuntu repository. This involves adding a new package source, verifying the validity of the downloads by adding the GPG key from Docker, and finally installing the package.

First, update your existing list of packages:

sudo apt update

Next, install a few prerequisite packages which let apt use packages over HTTPS:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

Then add the GPG key for the official Docker repository to your system:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker repository to APT sources:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

This will also update our package database with the Docker packages from the newly added repo.

Finally, install Docker:

sudo apt install docker-ce

Docker should now be installed, the daemon started, and the process enabled to start on boot.

Step 2 - Executing Docker

The docker command can only be executed by the root user or a user belonging to the docker group, which is created automatically during Docker's installation. If you want to avoid typing sudo whenever you run the docker command, add your username to the docker group:

sudo usermod -aG docker ${USER}

On MacOS

To run Docker on macOS, we need to install the Docker Desktop application for macOS, which can be downloaded from here:

https://docs.docker.com/desktop/install/mac-install/

⚠️ Warning: there is no warranty that the pre-built pygomodo container will work on Apple silicon. We'll soon release a pre-compiled container for ARM64.

Clone this wiki locally