Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offering an alternative to the deprecated apt-key tool #11990

Merged
merged 10 commits into from
Mar 2, 2021
38 changes: 11 additions & 27 deletions engine/install/debian.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,27 +84,14 @@ from the repository.
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
gnupg
```

2. Add Docker's official GPG key:

```bash
$ curl -fsSL {{ download-url-base }}/gpg | sudo apt-key add -
```

Verify that you now have the key with the fingerprint
`9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88`, by searching for the
last 8 characters of the fingerprint.

```bash
$ sudo apt-key fingerprint 0EBFCD88
$ curl -fsSL {{ download-url-base }}/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <[email protected]>
sub 4096R/F273FCD8 2017-02-22
```

3. Use the following command to set up the **stable** repository. To add the
Expand All @@ -127,30 +114,27 @@ from the repository.
<div id="x86_64_repo" class="tab-pane fade in active" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=amd64] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
<div id="armhf_repo" class="tab-pane fade" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=armhf] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
<div id="arm64_repo" class="tab-pane fade" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=arm64] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
Expand Down
39 changes: 11 additions & 28 deletions engine/install/ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,13 @@ from the repository.
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
gnupg
```

2. Add Docker's official GPG key:

```bash
$ curl -fsSL {{ download-url-base }}/gpg | sudo apt-key add -
```

Verify that you now have the key with the fingerprint
<span><code>9DC8 5822 9FC7 DD38 854A&nbsp;&nbsp;E2D8 8D81 803C 0EBF CD88</code></span>, by searching for the
last 8 characters of the fingerprint.
denis-roy marked this conversation as resolved.
Show resolved Hide resolved

```bash
$ sudo apt-key fingerprint 0EBFCD88

pub rsa4096 2017-02-22 [SCEA]
9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid [ unknown] Docker Release (CE deb) <[email protected]>
sub rsa4096 2017-02-22 [S]
$ curl -fsSL {{ download-url-base }}/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
denis-roy marked this conversation as resolved.
Show resolved Hide resolved
```

3. Use the following command to set up the **stable** repository. To add the
Expand All @@ -135,30 +121,27 @@ from the repository.
<div id="x86_64_repo" class="tab-pane fade in active" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=amd64] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
<div id="armhf_repo" class="tab-pane fade" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=armhf] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=armhf signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
<div id="arm64_repo" class="tab-pane fade" markdown="1">

```bash
$ sudo add-apt-repository \
"deb [arch=arm64] {{ download-url-base }} \
$(lsb_release -cs) \
stable"
$ echo \
"deb [arch=arm64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }} \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker-ce.list > /dev/null
```

</div>
Expand Down