diff --git a/engine/install/debian.md b/engine/install/debian.md index edc1f7f184f..2e0edc1d314 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -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) - sub 4096R/F273FCD8 2017-02-22 ``` 3. Use the following command to set up the **stable** repository. To add the @@ -127,30 +114,27 @@ from the repository.
```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.list > /dev/null ```
```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.list > /dev/null ```
```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.list > /dev/null ```
diff --git a/engine/install/ubuntu.md b/engine/install/ubuntu.md index d6f4b5f0dac..77a09a08682 100644 --- a/engine/install/ubuntu.md +++ b/engine/install/ubuntu.md @@ -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 - 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 - - pub rsa4096 2017-02-22 [SCEA] - 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88 - uid [ unknown] Docker Release (CE deb) - sub rsa4096 2017-02-22 [S] + $ curl -fsSL {{ download-url-base }}/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg ``` 3. Use the following command to set up the **stable** repository. To add the @@ -135,30 +121,27 @@ from the repository.
```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.list > /dev/null ```
```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.list > /dev/null ```
```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.list > /dev/null ```