Docker (un)install scripts
This commit is contained in:
parent
aaf88521b3
commit
c48971a858
@ -9,18 +9,19 @@ echo
|
||||
|
||||
# https://docs.docker.com/engine/install/ubuntu/
|
||||
|
||||
sudo apt remove -y docker docker-engine docker.io containerd runc
|
||||
sudo apt-get install \
|
||||
ca-certificates \
|
||||
curl \
|
||||
gnupg \
|
||||
lsb-release
|
||||
|
||||
sudo mkdir -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
||||
|
||||
sudo apt update
|
||||
sudo apt install -y --autoremove \
|
||||
docker-ce \
|
||||
@ -29,6 +30,9 @@ sudo apt install -y --autoremove \
|
||||
docker-compose-plugin \
|
||||
docker-compose
|
||||
sudo usermod -aG docker anthony
|
||||
|
||||
echo
|
||||
echo "You need to logout and log in again to apply docker group"
|
||||
echo "Finish!"
|
||||
echo "Probably, you need to relogin to apply 'docker' group."
|
||||
echo "Your ones currently are: $(groups)"
|
||||
echo
|
||||
|
21
uninstall/docker
Executable file
21
uninstall/docker
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Uninstall docker
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Uninstalling docker..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
# sudo apt remove -y docker docker-engine docker.io containerd runc
|
||||
sudo apt remove -y \
|
||||
containerd \
|
||||
containerd.io \
|
||||
docker \
|
||||
docker-ce \
|
||||
docker-ce-cli \
|
||||
docker-compose \
|
||||
docker-compose-plugin \
|
||||
docker-engine \
|
||||
docker.io \
|
||||
runc
|
Loading…
Reference in New Issue
Block a user