From 1145ee6caeba194f828eae0e4f42ea048665b774 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sun, 14 Feb 2021 16:35:57 +0100 Subject: [PATCH 1/2] Update Debian install documentation "the 64-bit version of one of these Debian or Raspbian versions" might be confusing, since there is no 64-bit Raspbian, which is naturally an armv6hf (32-bit) only repository. The 64-bit Raspberry Pi OS uses the regular arm64 Debian repository. Remove the 64-bit mention from this sentence, as the supported architectures are listed below. Add "Raspbian Buster" explicitly to the supported OS list. Do not use the deprecated "apt-key" command to add the repository key. Use "gpg --dearmor" instead to install the key as separate file into /etc/apt/trusted.gpg.d/. This fixes issue #11851. The deprecation warning can be seen e.g. in the Debian man pages: https://manpages.debian.org/testing/apt/apt-key.8.en.html Do not use the "add-apt-repository" command to add the repository list. It does not work on Raspbian, due to a missing template file: https://github.com/RPi-Distro/repo/issues/160 Moreover, the passed command line arguments are the exact content that needs to be added to the list file, hence can be used with a simple "echo". On Raspbian, the URL path needs to be adjusted. Since "lsb_release" cannot be used to print the distribution ID in lower case, instructions for Debian and Raspbian are separated into two tabs. The three tabs for the three supported package architectures have been merged via "$(dpkg --print-architecture)". A note has been added to replace this command substitution, if a foreign architecture is wanted. It may be removed completely to let DPkg choose the native architecture automatically, or the next best added foreign architecture, if the native one is not provided by the repository. With this change, the method can be used on Raspbian, hence the information about which method is supported by which distribution, has been removed. Do not expect the "lsb_release" command to be present, add the "lsb-release" package to the dependency list instead. "software-properties-common" is not required anymore as "add-apt-repository" is not used. To assure that the "gpg" command is available and the key can be handled by the system, add the "gnupg" package as well. The "apt-cache madison docker-ce" example output has been updated to show current packages available on Debian Buster. To support Debian and Raspbian, the MkDocs "download-url-base" variable has been truncated and "/debian" resp. "/raspbian" needs to be added literally to when calling it. Signed-off-by: MichaIng --- engine/install/debian.md | 78 ++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 47 deletions(-) diff --git a/engine/install/debian.md b/engine/install/debian.md index edc1f7f184f4..9dbbd2a06420 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -19,10 +19,9 @@ To get started with Docker Engine on Debian, make sure you ### OS requirements -To install Docker Engine, you need the 64-bit version of one of these Debian or -Raspbian versions: +To install Docker Engine, you need one of these Debian or Raspbian versions: -- Debian Buster 10 (stable) +- Debian Buster 10 / Raspbian Buster - Debian Stretch 9 / Raspbian Stretch Docker Engine is supported on `x86_64` (or `amd64`), `armhf`, and `arm64` architectures. @@ -48,7 +47,7 @@ You can install Docker Engine in different ways, depending on your needs: - Most users [set up Docker's repositories](#install-using-the-repository) and install from them, for ease of installation and upgrade tasks. This is the - recommended approach, except for Raspbian. + recommended approach. - Some users download the DEB package and [install it manually](#install-from-a-package) and manage @@ -57,7 +56,6 @@ You can install Docker Engine in different ways, depending on your needs: - In testing and development environments, some users choose to use automated [convenience scripts](#install-using-the-convenience-script) to install Docker. - This is currently the only approach for Raspbian. ### Install using the repository @@ -65,14 +63,9 @@ Before you install Docker Engine for the first time on a new host machine, you n to set up the Docker repository. Afterward, you can install and update Docker from the repository. -> **Raspbian users cannot use this method!** -> -> For Raspbian, installing using the repository is not yet supported. You must -> instead use the [convenience script](#install-using-the-convenience-script). - #### Set up the repository -{% assign download-url-base = "https://download.docker.com/linux/debian" %} +{% assign download-url-base = "https://download.docker.com/linux" %} 1. Update the `apt` package index and install packages to allow `apt` to use a repository over HTTPS: @@ -84,14 +77,14 @@ from the repository. apt-transport-https \ ca-certificates \ curl \ - gnupg-agent \ - software-properties-common + gnupg \ + lsb-release ``` 2. Add Docker's official GPG key: ```bash - $ curl -fsSL {{ download-url-base }}/gpg | sudo apt-key add - + $ curl -fsSL {{ download-url-base }}/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker.gpg ``` Verify that you now have the key with the fingerprint @@ -115,42 +108,36 @@ from the repository. > Debian distribution, such as `helium`. Sometimes, in a distribution > like BunsenLabs Linux, you might need to change `$(lsb_release -cs)` > to your parent Debian distribution. For example, if you are using - > `BunsenLabs Linux Helium`, you could use `stretch`. Docker does not offer any guarantees on untested + > `BunsenLabs Linux Helium`, you could use `stretch`. Docker does not offer any guarantees on untested > and unsupported Debian distributions. + > **Note**: The `dpkg --print-architecture` sub-command below returns the native + > package architecture of your Debian distribution, such as `arm64`. If you want to install + > Docker for a foreign package architecture, replace `$(dpkg --print-architecture)` + > with e.g. `armhf` or `arm64`. +
-
- - ```bash - $ sudo add-apt-repository \ - "deb [arch=amd64] {{ download-url-base }} \ - $(lsb_release -cs) \ - stable" - ``` - -
-
+
```bash - $ sudo add-apt-repository \ - "deb [arch=armhf] {{ download-url-base }} \ - $(lsb_release -cs) \ - stable" + $ echo \ + "deb [arch=$(dpkg --print-architecture)] {{ download-url-base }}/debian \ + $(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=$(dpkg --print-architecture)] {{ download-url-base }}/raspbian \ + $(lsb_release -cs) \ + stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ```
@@ -158,9 +145,6 @@ from the repository. #### Install Docker Engine -> **Note**: This procedure works for Debian on `x86_64` / `amd64`, Debian ARM, -> or Raspbian. - 1. Update the `apt` package index, and install the _latest version_ of Docker Engine and containerd, or go to the next step to install a specific version: @@ -184,15 +168,15 @@ from the repository. ```bash $ apt-cache madison docker-ce - docker-ce | 5:18.09.1~3-0~debian-stretch | {{ download-url-base }} stretch/stable amd64 Packages - docker-ce | 5:18.09.0~3-0~debian-stretch | {{ download-url-base }} stretch/stable amd64 Packages - docker-ce | 18.06.1~ce~3-0~debian | {{ download-url-base }} stretch/stable amd64 Packages - docker-ce | 18.06.0~ce~3-0~debian | {{ download-url-base }} stretch/stable amd64 Packages + docker-ce | 5:20.10.3~3-0~debian-buster | {{ download-url-base }}/debian buster/stable amd64 Packages + docker-ce | 5:20.10.2~3-0~debian-buster | {{ download-url-base }}/debian buster/stable amd64 Packages + docker-ce | 18.06.3~ce~3-0~debian | {{ download-url-base }}/debian buster/stable amd64 Packages + docker-ce | 18.06.2~ce~3-0~debian | {{ download-url-base }}/debian buster/stable amd64 Packages ... ``` b. Install a specific version using the version string from the second column, - for example, `5:18.09.1~3-0~debian-stretch `. + for example, `5:20.10.3~3-0~debian-buster`. ```bash $ sudo apt-get install docker-ce= docker-ce-cli= containerd.io @@ -225,7 +209,7 @@ If you cannot use Docker's repository to install Docker Engine, you can download `.deb` file for your release and install it manually. You need to download a new file each time you want to upgrade Docker. -1. Go to [`{{ download-url-base }}/dists/`]({{ download-url-base }}/dists/){: target="_blank" rel="noopener" class="_" }, +1. Go to [`{{ download-url-base }}/debian/dists/`]({{ download-url-base }}/debian/dists/){: target="_blank" rel="noopener" class="_" }, choose your Debian version, then browse to `pool/stable/`, choose `amd64`, `armhf`, or `arm64` and download the `.deb` file for the Docker version you want to install. From cc818cb62769f18c7a10b47b2e90a221d3fde744 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Sat, 24 Apr 2021 14:54:00 +0200 Subject: [PATCH 2/2] Add linebreak as not all browsers all horizontal scroll bars on long lines Co-authored-by: Sebastiaan van Stijn --- engine/install/debian.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engine/install/debian.md b/engine/install/debian.md index 66855e12d27b..f4f5e4a278f1 100644 --- a/engine/install/debian.md +++ b/engine/install/debian.md @@ -112,7 +112,8 @@ from the repository. ```console $ echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] {{ download-url-base }}/debian \ + "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] \ + {{ download-url-base }}/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null ```