From a8887266485a4053b6c3c1f882e1ee384d0e8bc3 Mon Sep 17 00:00:00 2001 From: WickedYoda <68271168+wickedyoda@users.noreply.github.com> Date: Sun, 31 Dec 2023 14:30:47 -0600 Subject: [PATCH] Add script to install docker --- ubuntu-debian-based/install_docker_debian.sh | 31 ++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 ubuntu-debian-based/install_docker_debian.sh diff --git a/ubuntu-debian-based/install_docker_debian.sh b/ubuntu-debian-based/install_docker_debian.sh new file mode 100644 index 0000000..4ac86a5 --- /dev/null +++ b/ubuntu-debian-based/install_docker_debian.sh @@ -0,0 +1,31 @@ +/#bash + +#Make sure Cache is updated +apt update + +# Bring system up to date (can be # out as not always required) +apt upgrade -y + +#install certs app +apt install ca-certificates curl gnupg + +#import keyrings +install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg +chmod a+r /etc/apt/keyrings/docker.gpg + +#Add docker repo to apt sources +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" | \ + tee /etc/apt/sources.list.d/docker.list > /dev/null + +#Pull cache sources including docker now. +apt update + +#install docker +apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -y + +#Add current user to docker admin group, takes affect after logout and back in +usermod -aG docker $USER +newgrp docker \ No newline at end of file