Skip to content

Commit 9d43237

Browse files
committed
Replace usage of deprecated apt-key
Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 9d763ff commit 9d43237

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

install-containerd-helpers

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ function install_debian_containerd() {
6565
# Make sure ca-certificates are up-to-date
6666
update-ca-certificates -f
6767

68-
curl -fsSL "${REPO_URL}/gpg" | apt-key add -
68+
install -m 0755 -d /etc/apt/keyrings
69+
curl -fsSL "${REPO_URL}/gpg" | tee /etc/apt/keyrings/docker.asc
70+
chmod a+r /etc/apt/keyrings/docker.asc
6971

7072
if [ "${DIST_VERSION}" = "sid" ]; then
7173
echo 'Debian sid ("unstable") cannot be used for packaging: replace with the actual codename'
@@ -77,7 +79,7 @@ function install_debian_containerd() {
7779
# Once a containerd package becomes stable it will also be available in the test channel,
7880
# so this logic works for both cases.
7981
# (See also same logic in install_rpm_containerd)
80-
echo "deb [arch=${ARCH}] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list
82+
echo "deb [arch=${ARCH} signed-by=/etc/apt/keyrings/docker.asc] ${REPO_URL} ${DIST_VERSION} test" > /etc/apt/sources.list.d/docker.list
8183

8284
apt-get update
8385
}

0 commit comments

Comments
 (0)