fix(docker): install gpg on slim images (#34340)
This commit is contained in:
parent
4d55d3039a
commit
224d7bf847
|
|
@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then
|
||||||
apt-get install -y curl
|
apt-get install -y curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GnuPG is not preinstalled in slim images
|
||||||
|
if ! command -v gpg >/dev/null; then
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y gpg
|
||||||
|
fi
|
||||||
|
|
||||||
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
||||||
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then
|
||||||
apt-get install -y curl
|
apt-get install -y curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GnuPG is not preinstalled in slim images
|
||||||
|
if ! command -v gpg >/dev/null; then
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y gpg
|
||||||
|
fi
|
||||||
|
|
||||||
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
||||||
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,12 @@ if ! command -v curl >/dev/null; then
|
||||||
apt-get install -y curl
|
apt-get install -y curl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# GnuPG is not preinstalled in slim images
|
||||||
|
if ! command -v gpg >/dev/null; then
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y gpg
|
||||||
|
fi
|
||||||
|
|
||||||
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
# 3. Add the GPG key, the apt repo, update the apt cache, and install the package
|
||||||
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /tmp/microsoft.gpg
|
||||||
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
install -o root -g root -m 644 /tmp/microsoft.gpg /etc/apt/trusted.gpg.d/
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue