Docker

Procédures pour Docker

Installation de Docker et docker-compose

Installation de Docker

Debian

Enlever les anciennes versions du dépôt principal

sudo apt remove docker docker-engine docker.io containerd runc
apt update && apt upgrade && apt install apt-transport-https ca-certificatescurl gnupg lsb-release
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
 sudo apt update
 sudo apt install docker-ce docker-ce-cli containerd.io

Activation de Docker

sudo systemctl start docker
sudo systemctl enable docker
docker run hello-world

Source: https://docs.docker.com/engine/install/debian/

Instalation de docker-compose

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Vérifiez le lien afin de prendre la dernière version (ici la 1.29.2) en regardant le dernier numéro de version sur github

$ docker-compose --version
docker-compose version 1.29.2, build 1110ad01
Sauce: https://docs.docker.com/compose/install/