-Y flag in install

This commit is contained in:
Fabio Sinibaldi 2025-02-25 15:48:19 +01:00
parent 82806d7433
commit 69642493ce
1 changed files with 4 additions and 6 deletions

View File

@ -2,7 +2,7 @@
echo "Installing denpendency packages..." echo "Installing denpendency packages..."
sudo apt update sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common lsb-release sudo apt install -y apt-transport-https ca-certificates curl software-properties-common lsb-release
echo "Installing docker key..." echo "Installing docker key..."
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg
@ -14,7 +14,7 @@ echo "Refreshing packages.."
sudo apt update sudo apt update
echo "NB Check if installing from Docker repo instead of Ubuntu repo" echo "NB Check if installing from Docker repo instead of Ubuntu repo"
apt-cache policy docker-ce apt-cache policy -y docker-ce
# Check repo # Check repo
read -p "Are we installing from Docker repo? (Y/N): " repo_ok read -p "Are we installing from Docker repo? (Y/N): " repo_ok
@ -24,10 +24,7 @@ if [[ $repo_ok == [nN] || $repo_ok == [nN][oO] ]]; then
fi fi
echo "Installing docker Community Edition" echo "Installing docker Community Edition"
sudo apt install docker-ce sudo apt install -y docker-ce
echo "Docker status : "
systemctl status docker
#Add user to docker group #Add user to docker group
read -p "Do you want to add the current user to docker group? (Y/N): " add_user read -p "Do you want to add the current user to docker group? (Y/N): " add_user
@ -38,3 +35,4 @@ if [[ $add_user == [yY] || $add_user == [yY][eE][sS] ]]; then
fi fi
echo "Process finished" echo "Process finished"
echo "use 'systemctl status docker' to inspect"