added docker to install

This commit is contained in:
2025-05-14 17:43:06 -04:00
parent 048a87fa23
commit 002b1ec0d8
2 changed files with 56 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
# offical code snipet to setup apt repo for docker:
# https://docs.docker.com/engine/install/debian/#install-using-the-repository
# ----------------------------------------------------------
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] 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-get update
+36
View File
@@ -4,6 +4,7 @@ called_backup=false
called_update=false
curdate=$(date '+%Y-%m-%d')
script_dir=$(dirname "$0")
show_note=false
# absolute path to this scripts parent directory (package root)
package_dir=$(readlink -f "$0" | xargs dirname | xargs dirname)
@@ -69,6 +70,36 @@ install_collection 'core utilities: (curl, python3, jq, htop, etc.)' curl fail2b
install_collection 'extra utilities: (ncdu, zip, php, rclone, etc.)' ncdu zip unzip iftop colorized-logs php-cli ca-certificates gnupg lsb-release rclone
# ----------------------------------------------------------
read -p 'Install Docker? [y/N]: ' response
case "${response}" in
[Yy]* )
"${script_dir}/../docker-install/docker-install.sh"
sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y
;;
* )
echo 'Skipping'
;;
esac
echo ''
# ----------------------------------------------------------
read -p 'Add user to docker group? [y/N]: ' response
case "${response}" in
[Yy]* )
sudo groupadd docker
sudo usermod -aG docker "${USER}"
show_note=true
;;
* )
echo 'Skipping'
;;
esac
echo ''
# ----------------------------------------------------------
install_collection 'Ruby: (ruby, build-essential)' ruby-full build-essential zlib1g-dev
@@ -147,6 +178,11 @@ echo ''
# ----------------------------------------------------------
if [ "${show_note}" = true ]; then
echo -e "\e[33myou will need to logout and back in before the 'docker' group will show up"
echo ''
fi
if [ "${called_backup}" = true ]; then
echo -e "\e[33mremember some changes will not take effect until you run:"
echo -e "\e[36msource ~/.bashrc\e[m"