From 810a61f4bb49ed8992472ea858618c63fe85e7ee Mon Sep 17 00:00:00 2001 From: francesco Date: Tue, 28 Nov 2023 18:33:43 +0100 Subject: [PATCH] fix debian distro --- app/docker.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/docker.sh b/app/docker.sh index c7b9836..2da46ba 100644 --- a/app/docker.sh +++ b/app/docker.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash +## Set environment +distro=$(lsb_release -is | tr '[:upper:]' '[:lower:]') + ## Remove old Docker version apt-get remove docker docker-engine docker.io containerd runc || true @@ -9,12 +12,12 @@ apt-get install -y ca-certificates curl gnupg ## Create keyrings mkdir -m 0755 -p /etc/apt/keyrings -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +curl -fsSL "https://download.docker.com/linux/${distro}/gpg" | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg chmod a+r /etc/apt/keyrings/docker.gpg ## Setup the repository echo \ - "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/${distro} \ "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ sudo tee /etc/apt/sources.list.d/docker.list > /dev/null