S'applique à : LifeinCloud Cloud VPS • Ubuntu 22.04 LTS
Présentation
Docker vous permet d’exécuter des applications dans des conteneurs légers et portables. Bien que LifeinCloud propose une image Docker en 1 clic pour une configuration instantanée, vous pouvez également installer Docker manuellement pour plus de contrôle. Ce guide couvre le processus d’installation manuelle.
Prérequis
- Un VPS LifeinCloud avec Ubuntu 22.04 LTS.
- Accès Root SSH.
Étape 1 — Mettre à jour votre VPS
ssh root@YOUR_SERVER_IP
apt update && apt upgrade -y
Étape 2 — Installer les dépendances
apt install -y apt-transport-https ca-certificates curl software-properties-common
Étape 3 — Ajouter le dépôt officiel Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" \
> /etc/apt/sources.list.d/docker.list
apt update
Étape 4 — Installer Docker Engine
apt install -y docker-ce docker-ce-cli containerd.io
Étape 5 — Vérifier l’installation
docker --version
docker run hello-world
Optionnel — Installer Docker Compose
curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
docker-compose --version
Astuce : Vous pouvez ignorer toutes les étapes manuelles en déployant notre image Docker VPS en 1 clic depuis le panneau de contrôle LifeinCloud.