33 lines
893 B
Bash
33 lines
893 B
Bash
#!/bin/bash
|
|
|
|
echo -e "\n>>> Updating system...\n"
|
|
apt update
|
|
|
|
echo -e "\n>>> Upgrading system...\n"
|
|
apt upgrade -y
|
|
|
|
echo -e "\n>>> Installing Docker...\n"
|
|
|
|
apt install -y ca-certificates curl
|
|
install -m 0755 -d /etc/apt/keyrings
|
|
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
|
chmod a+r /etc/apt/keyrings/docker.asc
|
|
|
|
echo -e "\n>>> Adding Docker repository...\n"
|
|
|
|
tee /etc/apt/sources.list.d/docker.sources > /dev/null <<EOF
|
|
Types: deb
|
|
URIs: https://download.docker.com/linux/debian
|
|
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
|
|
Components: stable
|
|
Architectures: $(dpkg --print-architecture)
|
|
Signed-By: /etc/apt/keyrings/docker.asc
|
|
EOF
|
|
|
|
apt update
|
|
|
|
echo -e "\n>>> Installing Docker packages...\n"
|
|
|
|
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
|
|
|
echo -e "\n>>> Docker installation complete!\n" |