Installer docker & docker-compose
Etape 1 : Les dépendances
apt install apt-transport-https ca-certificates gnupg2 software-properties-common
Etape 2 : Ajouter docker dans le repository
curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
Etape 3 : Mise à jour des paquets
apt update
Etape 4 : Installer Docker
apt install docker-ce
Etape 5 : Test
systemctl status docker
root@vm-web:~# systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; preset: enabled)
Active: active (running) since Sun 2023-12-10 19:27:20 CET; 33s ago
TriggeredBy: ● docker.socket
Docs: https://docs.docker.com
Main PID: 8610 (dockerd)
Tasks: 9
Memory: 29.8M
CPU: 394ms
CGroup: /system.slice/docker.service
└─8610 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
déc. 10 19:27:20 vm-web systemd[1]: Starting docker.service - Docker Application Container Engine...
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.284944139+01:00" level=info msg="Starting up"
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.430101570+01:00" level=info msg="Loading containers: start."
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.769213106+01:00" level=info msg="Loading containers: done."
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.789324414+01:00" level=info msg="Docker daemon" commit=311b9ff graphdriver=overlay2 version=24.0.7
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.789479443+01:00" level=info msg="Daemon has completed initialization"
déc. 10 19:27:20 vm-web dockerd[8610]: time="2023-12-10T19:27:20.830725349+01:00" level=info msg="API listen on /run/docker.sock"
déc. 10 19:27:20 vm-web systemd[1]: Started docker.service - Docker Application Container Engine.
Etape 6 : Installer docker-compose
apt-get install docker-compose