Last active
May 20, 2025 06:39
-
-
Save zakery1369/b32619b836405bb211dc3e0825f79276 to your computer and use it in GitHub Desktop.
Debian Docker Auto-Installer Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt autoremove -y | |
# Docker has restricted access to some countries | |
# echo "nameserver 192.168.X.X" | sudo tee /etc/resolv.conf >/dev/null | |
sudo apt install ca-certificates curl gnupg -y | |
sudo install -m 0755 -d /etc/apt/keyrings | |
sudo curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg | |
sudo chmod a+r /etc/apt/keyrings/docker.gpg | |
sudo echo \ | |
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ | |
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ | |
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | |
sudo apt update | |
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
echo "=== Docker Installed Successfully ===" | |
echo " Zakops.com " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment