Skip to content

Getting started with the tutorial

This tutorial aims to introduce the basic principles of containerisation with Docker.

Prerequisites

This tutorial aims to introduce the basic principles of containerisation with Docker.

In order to follow this tutorial, two prerequisites are necessary:

Installation of Docker

Follow the instructions according to the operating system you are using.

sudo yum install -y yum-utils device-mapper-persistent-data lvm2
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install -y docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo usermod -aG docker $USER
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo usermod -aG docker $USER

Warning

Do not install Docker with snap

  • For Mac, you need a version of macOS greater or equal to 11 and to install docker desktop by downloading Docker.dmg file according to your computer architecture:

Then follow the official instructions.

To test, if Docker is correctly installed, run in a terminal:

docker version

The output should be something like:

Client:
 Version:           23.0.3
 API version:       1.42
 Go version:        go1.20.3
 Git commit:        3e7cbfdee1
 Built:             Thu Apr 20 11:44:57 2023
 OS/Arch:           linux/amd64
 Context:           default
 ...