translate install/raspberry-pi.md

pull/470/head
Dorsey.Xu 2020-10-26 15:03:45 +08:00
parent 6c8e710c53
commit b54b5b0a0f
3 changed files with 33 additions and 32 deletions

View File

@ -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

View File

@ -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

View File

@ -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).