Browse Source

removed lsb_release

Toastie 1 year ago
parent
commit
e5340f5759
1 changed files with 4 additions and 3 deletions
  1. 4 3
      install_docker.sh

+ 4 - 3
install_docker.sh

@@ -9,14 +9,15 @@ apt-get update && apt-get install --yes \
     ca-certificates \
     curl \
     gnupg \
-    lsb-release
 
 # Add trust and docker apt repo
 mkdir -m 0755 -p /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
 echo \
-  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
-  $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
+  "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
 
 # Install docker
 apt-get update && apt-get install --yes \