docker: do not break if gpg key exists #2074

This commit is contained in:
openoms 2022-03-15 17:03:50 +00:00
parent 1241636263
commit ef70b621b8
No known key found for this signature in database
GPG key ID: 5BFB77609B081B65

View file

@ -41,7 +41,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
lsb-release
# add the docker repo
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
if ! gpg /usr/share/keyrings/docker-archive-keyring.gpg 2>/dev/null; then
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
fi
echo \
"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null