#!/bin/bash #Colors RED="\e[1;31m" GREEN="\e[1;32m" YELLOW="\e[1;33m" BLUE="\e[1;34m" DEFAULT="\e[0m" # Check if the script is run with root privileges if [ "$EUID" -ne 0 ]; then echo "Please run this script as root or using sudo." exit 1 fi echo -e "${YELLOW}Do you want to Update the system?: [Y/n]${DEFAULT}" read -r confirmation if [[ ! "$confirmation" =~ ^[Nn]|[Nn][Oo]$ ]]; then echo "Updating..." sudo apt-get update -y sudo apt-get upgrade -y else echo "You choose no" fi echo -e "${YELLOW}Do you want to Install Docker?: [Y/n]${DEFAULT}" read -r confirmation if [[ ! "$confirmation" =~ ^[Nn]|[Nn][Oo]$ ]]; then echo "Installing..." if [ $(dpkg -l | grep -c "docker-c" ) -eq 0 ]; then sudo apt-get install -y \ ca-certificates \ curl \ gnupg \ lsb-release \ make echo -e "${BLUE}Adding Docker's official GPG key${DEFAULT}" sudo install -m 0755 -d /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc sudo chmod a+r /etc/apt/keyrings/docker.asc echo -e "${BLUE}Add the repository to Apt sources${DEFAULT}" sudo tee /etc/apt/sources.list.d/docker.sources <