-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker.sh
More file actions
29 lines (19 loc) · 986 Bytes
/
docker.sh
File metadata and controls
29 lines (19 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-20-04-fr
sudo apt-get update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
# Ajouter la clé GPG de Docker :
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
# Ajoutez le dépôt de Docker :
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
# install docker
sudo apt install docker-ce docker-ce-cli containerd.io
sudo usermod -aG ${USER}
# Se déconnecter et se reconnecter pour appliquer les modifications de groupe :
newgrp docker
# enable and start
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker
# Vérification de l'installation
docker run hello-world