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:
- to have installed Docker (see below)
- to have an account on the IN2P3 gitlab (https://gitlab.in2p3.fr)
Installation of Docker¶
Follow the instructions according to the operating system you are using.
- Linux CentOS: Official instructions
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
- Linux Ubuntu: Official instructions
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 downloadingDocker.dmg
file according to your computer architecture:-
for ARM chip: Docker.dmg;
-
for Intel chip: Docker.dmg.
-
Then follow the official instructions.
- For Windows, download and run the executable Docker Desktop for Windows.exe; then follow the official instructions.
To test, if Docker is correctly installed, run in a terminal:
The output should be something like: