Skip to content

Commit 6b0165e

Browse files
author
Tim Bannister
committed
Improve advice for configuring PGP keys for APT
The Debian tool, APT, lets you write GPG keyrings into a file per trusted source, inside /etc/apt/trusted.gpg.d Recommend that approach, as it is easier to manage.
1 parent 0f0e87a commit 6b0165e

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

content/en/docs/setup/production-environment/container-runtimes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ sudo apt-get update && sudo apt-get install -y \
8181

8282
```shell
8383
# Add Docker's official GPG key:
84-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
84+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/docker.gpg -
8585
```
8686

8787
```shell
@@ -244,8 +244,8 @@ cat <<EOF | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cr
244244
"deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /"
245245
EOF
246246

247-
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | sudo apt-key add -
248-
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add -
247+
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg -
248+
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg -
249249

250250
sudo apt-get update
251251
sudo apt-get install cri-o cri-o-runc
@@ -276,8 +276,8 @@ Then run
276276
sudo echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
277277
sudo echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable:/cri-o:/$VERSION/$OS/ /" > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable:cri-o:$VERSION.list
278278

279-
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | sudo apt-key add -
280-
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add -
279+
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/$OS/Release.key | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/libcontainers.gpg
280+
curl -L https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable:cri-o:$VERSION/$OS/Release.key | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/libcontainers-cri-o.gpg -
281281

282282
sudo apt-get update
283283
sudo apt-get install cri-o cri-o-runc
@@ -387,7 +387,7 @@ sudo apt-get update && sudo apt-get install -y apt-transport-https ca-certificat
387387

388388
```shell
389389
## Add Docker's official GPG key
390-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
390+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add --keyring /etc/apt/trusted.gpg.d/docker.gpg -
391391
```
392392

393393
```shell

0 commit comments

Comments
 (0)