Ceci est une ancienne révision du document !
Mise à jour des sources list:
#apt update
Instal des pré-requis:
#apt install ca-certificates curl gnupg lsb-release
Download de la clé de signature:
#curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Création du dossier key:
#mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg –dearmor -o /etc/apt/keyrings/docker.gpg
2dition de la source list:
#echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Installation de docker et dépendance:
#apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin
Pour tester si install ok:
#docker run hello-world
Réponse si ok:
#Hello from Docker! This message shows that your installation appears to be working correctly.
Receiving a GPG error when running apt-get update?
Your default umask may not be set correctly, causing the public key file for the repo to not be detected. Run the following command and then try to update your repo again:
#chmod a+r /etc/apt/keyrings/docker.gpg
| Pour obtenir un shell root dans un container | docker exec -it -u root name_of_container bash |
| Pour obtenir la commande IP ADD | apt install iproute2 |
| Pour lister les containers actifs | docker ps -a |
| Pour supprimer un container | docker rm name_of_container |
| Pour lancer container avec fichier .yml | docker compose up -d |
| Vérifier si docker fonctionne | docker run hello-word |
| Vérifier les réseaux docker | docker network ls |
| Vérifier status service docker | systemctl status docker |
| Vérifier version docker | docker version |
| info docker | docker system info |
| Vérifier stockage doicker | docker system df |
| chercher une image | docker search debian |