From b54b5b0a0f16c7b1f8ca5e9f31d0ef185fb9110a Mon Sep 17 00:00:00 2001 From: "Dorsey.Xu" Date: Mon, 26 Oct 2020 15:03:45 +0800 Subject: [PATCH] translate install/raspberry-pi.md --- install/centos.md | 2 +- install/debian.md | 2 +- install/raspberry-pi.md | 61 +++++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/install/centos.md b/install/centos.md index 5298ac6..91fc68a 100644 --- a/install/centos.md +++ b/install/centos.md @@ -72,7 +72,7 @@ $ sudo yum install docker-ce ### Install with Automatic Scripts -To simplify the installation process during test or development, Docker official provides a convenient installation script, you can install docker on Fedora with the following script: +To simplify the installation process during test or development, Docker official provides a convenient installation script, you can install docker on CentOS with the following script: ```bash $ curl -fsSL get.docker.com -o get-docker.sh diff --git a/install/debian.md b/install/debian.md index 4b80adf..9de9a27 100644 --- a/install/debian.md +++ b/install/debian.md @@ -67,7 +67,7 @@ $ sudo add-apt-repository \ #### Install Docker CE -Update apt cache and install `docker-ce` +Update apt cache and install `docker-ce`. ```bash $ sudo apt-get update diff --git a/install/raspberry-pi.md b/install/raspberry-pi.md index 4a15a03..206e4e5 100644 --- a/install/raspberry-pi.md +++ b/install/raspberry-pi.md @@ -1,20 +1,21 @@ -## 树莓派卡片电脑安装 Docker CE +## Install Docker CE on Raspberry Pi SoC ->警告:切勿在没有配置 Docker APT 源的情况下直接使用 apt 命令安装 Docker. +> WARNING: DO NOT install Docker with apt directly without configuring apt source. -### 系统要求 -Docker CE 不仅支持 `x86_64` 架构的计算机,同时也支持 `ARM` 架构的计算机,本小节内容以树莓派单片电脑为例讲解 `ARM` 架构安装 Docker CE。 +### OS Requirement -Docker CE 支持以下版本的 [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) 操作系统: +Docker CE supports not only `x86_64` architecture computers, but also `ARM` ones. In this section, we will take Raspberry Pi SoC as an example to explain how to install Docker CE on `ARM` computers. + +Docker CE supports the following [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) versions. * Raspbian Stretch -*注:* `Raspbian` 是树莓派的开发与维护机构 [树莓派基金会](http://www.raspberrypi.org/) 推荐用于树莓派的首选系统,其基于 `Debian`。 +*NOTE:* `Raspbian` is the top OS on Raspberry Pi recommended by [Raspberry Pi Foundation](https://www.raspberrypi.org/), which is the development and maintenance organization for Raspberry Pi. Raspbian is based on `Debian`. -### 使用 APT 安装 +### Install with apt -由于 apt 源使用 HTTPS 以确保软件下载过程中不被篡改。因此,我们首先需要添加使用 HTTPS 传输的软件包以及 CA 证书。 +Since the apt source uses HTTPS to make sure that the software is not modified maliciously during download, we have to add the apt source via HTTPS as well as the CA certificate. ```bash $ sudo apt-get update @@ -28,19 +29,19 @@ $ sudo apt-get install \ software-properties-common ``` -鉴于国内网络问题,强烈建议使用国内源,官方源请在注释中查看。 +Due to the network issues in China mainland, it is highly recommended for Chinese users to use Chinese sources. Please refer to the official sources in the comments(they are replaced by a Chinese source). -为了确认所下载软件包的合法性,需要添加软件源的 GPG 密钥。 +To verify the validity of the package downloaded, we have to add the GPG key for the package source. ```bash $ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/raspbian/gpg | sudo apt-key add - -# 官方源 +# Official source # $ curl -fsSL https://download.docker.com/linux/raspbian/gpg | sudo apt-key add - ``` -然后,我们需要向 `source.list` 中添加 Docker CE 软件源: +After that, we need to add the Docker CE source to `source.list`: ```bash $ sudo add-apt-repository \ @@ -49,18 +50,18 @@ $ sudo add-apt-repository \ stable" -# 官方源 +# Official Source # $ sudo add-apt-repository \ # "deb [arch=armhf] https://download.docker.com/linux/raspbian \ # $(lsb_release -cs) \ # stable" ``` ->以上命令会添加稳定版本的 Docker CE APT 源,如果需要测试或每日构建版本的 Docker CE 请将 stable 改为 test 或者 nightly。 +> The above commands will add the APT source for the stable version of Docker CE. If you need the `test` or `nightly` source, please replace with them to meet your own needs. -#### 安装 Docker CE +#### Install Docker CE -更新 apt 软件包缓存,并安装 `docker-ce`。 +Update apt cache and install `docker-ce`. ```bash $ sudo apt-get update @@ -68,43 +69,43 @@ $ sudo apt-get update $ sudo apt-get install docker-ce ``` -### 使用脚本自动安装 +### Install with Automatic Scripts -在测试或开发环境中 Docker 官方为了简化安装流程,提供了一套便捷的安装脚本,Raspbian 系统上可以使用这套脚本安装: +To simplify the installation process during test or development, Docker official provides a convenient installation script, you can install docker on Raspbian with the following script: ```bash $ curl -fsSL get.docker.com -o get-docker.sh $ sudo sh get-docker.sh --mirror Aliyun ``` -执行这个命令后,脚本就会自动的将一切准备工作做好,并且把 Docker CE 的 Edge 版本安装在系统中。 +After execution, the script will have everything prepared, and have installed the stable version on your OS. -### 启动 Docker CE +### Start Docker CE ```bash $ sudo systemctl enable docker $ sudo systemctl start docker ``` -### 建立 docker 用户组 +### Add Docker Usergroups -默认情况下,`docker` 命令会使用 [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) 与 Docker 引擎通讯。而只有 `root` 用户和 `docker` 组的用户才可以访问 Docker 引擎的 Unix socket。出于安全考虑,一般 Linux 系统上不会直接使用 `root` 用户。因此,更好地做法是将需要使用 `docker` 的用户加入 `docker` 用户组。 +Command `docker` uses [Unix socket](https://en.wikipedia.org/wiki/Unix_domain_socket) to communicate with Docker engine by default. Only users of `root` and `docker` groups can communicate with Unix socket of the Docker engine.`root` user is not directly used on Linux systems in general for security. Therefore, it is better to add users who need to use `docker` to the `docker` user group. -建立 `docker` 组: +create `docker` group: ```bash $ sudo groupadd docker ``` -将当前用户加入 `docker` 组: +add current user to `docker` group: ```bash $ sudo usermod -aG docker $USER ``` -退出当前终端并重新登录,进行如下测试。 +Exit current terminal and relogin to test. -### 测试 Docker 是否安装正确 +### Verify the Installation ```bash $ docker run arm32v7/hello-world @@ -137,10 +138,10 @@ For more examples and ideas, visit: https://docs.docker.com/get-started/ ``` -若能正常输出以上信息,则说明安装成功。 +If it shows the above message, it means your installation is successful. -*注意:* ARM 平台不能使用 `x86` 镜像,查看 Raspbian 可使用镜像请访问 [arm32v7](https://hub.docker.com/u/arm32v7/)。 +*NOTE:* ARM platform cannot use `x86` mirrors, to view a list of the mirrors supported on Raspbian, please visit [arm32v7](https://hub.docker.com/u/arm32v7/). -### 镜像加速 +### Registry Mirror(In China) -如果在使用过程中发现拉取 Docker 镜像十分缓慢,可以配置 Docker [国内镜像加速](mirror.md)。 +If you pull docker images very slowly, then you can configure [Registry Mirror](mirror.md).