Skip to content

Commit ec0809d

Browse files
committed
Update to use "/etc/apt/keyrings" per APT maintainers recommendations
See https://tracker.debian.org/news/1305679/accepted-apt-240-source-into-unstable/: * Install an empty /etc/apt/keyrings directory. This directory is intended to provide an alternative to /usr/share/keyrings for placing keys used with signed-by. See also https://wiki.debian.org/DebianRepository/UseThirdParty?action=diff&rev2=47&rev1=46 (which was edited following a discussion with the APT maintainers about the expected usage): > If future updates to the key will be managed by an apt/dpkg package as recommended below, then it SHOULD be downloaded into `/usr/share/keyrings` using the same filename that will be provided by the package. If it will be managed locally , it SHOULD be downloaded into `/etc/apt/keyrings` instead. Signed-off-by: Tianon Gravi <[email protected]>
1 parent 65c3515 commit ec0809d

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

engine/install/debian.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ from the repository.
9292
2. Add Docker's official GPG key:
9393

9494
```console
95-
$ curl -fsSL {{ download-url-base }}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
95+
$ sudo mkdir -p /etc/apt/keyrings
96+
$ curl -fsSL {{ download-url-base }}/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
9697
```
9798

9899
3. Use the following command to set up the **stable** repository. To add the
@@ -101,7 +102,7 @@ from the repository.
101102

102103
```console
103104
$ echo \
104-
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
105+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] {{ download-url-base }} \
105106
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
106107
```
107108

@@ -128,7 +129,7 @@ This procedure works for Debian on `x86_64` / `amd64`, `armhf`, `arm64`, and Ras
128129
>
129130
> Your default umask may not be set correctly, causing the public key file
130131
> for the repo to not be detected. Run the following command and then try to
131-
> update your repo again: `sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg`.
132+
> update your repo again: `sudo chmod a+r /etc/apt/keyrings/docker.gpg`.
132133

133134
2. To install a _specific version_ of Docker Engine, list the available versions
134135
in the repo, then select and install:

engine/install/ubuntu.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ from the repository.
118118
2. Add Docker's official GPG key:
119119

120120
```console
121-
$ curl -fsSL {{ download-url-base }}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
121+
$ sudo mkdir -p /etc/apt/keyrings
122+
$ curl -fsSL {{ download-url-base }}/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
122123
```
123124

124125
3. Use the following command to set up the **stable** repository. To add the
@@ -127,7 +128,7 @@ from the repository.
127128

128129
```console
129130
$ echo \
130-
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
131+
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] {{ download-url-base }} \
131132
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
132133
```
133134

0 commit comments

Comments
 (0)