fix docker install on ubuntu

This commit is contained in:
Igor Pečovnik
2021-09-09 22:23:53 +02:00
committed by GitHub
parent 1e970ac371
commit 3ddbce3fe9

View File

@@ -636,16 +636,17 @@ fi
install_docker ()
{
if [[ $distribution == groovy || $distribution == focal || $distribution == bionic ]]; then
curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - > /dev/null 2>&1
debconf-apt-progress -- apt-get update
if [[ $distribution == hirsute || $distribution == focal || $distribution == bionic ]]; then
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu focal stable" > \
/etc/apt/sources.list.d/docker.list
debconf-apt-progress -- apt-get install -y -qq --no-install-recommends docker.io
else
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/debian buster stable" >\
/etc/apt/sources.list.d/docker.list
fi
curl -fsSL "https://download.docker.com/linux/debian/gpg" | apt-key add -qq - > /dev/null 2>&1
debconf-apt-progress -- apt-get update
debconf-apt-progress -- apt-get install -y -qq --no-install-recommends docker-ce docker-ce-cli containerd.io
fi
}