first commit
This commit is contained in:
22
files/debian/debian-docker-install.sh
Executable file
22
files/debian/debian-docker-install.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
# ask to install docker
|
||||
if [[ ! -f /etc/apt/keyrings/docker.gpg ]] ; then
|
||||
read -r -p "Install Docker? <y/N> " prompt
|
||||
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
|
||||
# prepare for install
|
||||
apt-get update
|
||||
apt-get install -y ca-certificates curl gnupg lsb-release
|
||||
mkdir -p /home/akanealw/docker/appdata
|
||||
chown -R akanealw:akanealw /home/akanealw/docker
|
||||
mkdir -m 0755 -p /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
||||
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
# install docker
|
||||
apt-get update
|
||||
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
|
||||
# post install
|
||||
groupadd docker > /dev/null 2>&1
|
||||
usermod -aG docker akanealw
|
||||
systemctl enable docker.service
|
||||
systemctl enable containerd.service
|
||||
fi
|
||||
fi
|
||||
Reference in New Issue
Block a user