Skip to content

Commit

Permalink
fix debian distro
Browse files Browse the repository at this point in the history
  • Loading branch information
francescobianco committed Nov 28, 2023
1 parent e10797a commit 810a61f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/docker.sh
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

Expand Down

0 comments on commit 810a61f

Please # to comment.