update install/mirror.md

pull/470/head
Dorsey.Xu 2020-10-26 16:35:34 +08:00
parent 48bcb9470b
commit 41633ecf24
1 changed files with 20 additions and 20 deletions

View File

@ -1,20 +1,21 @@
##
## Mirror Accelerators
Docker Hub
You may have difficulty pulling images from Docker Hub if you are in China. To resolve this issue, you may configure mirror accelerators. There are many cloud service providers that provide accelerators in China, for example,
* [Azure `https://dockerhub.azk8s.cn`](https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy)
* [()](https://cr.console.aliyun.com/cn-hangzhou/mirrors)
* [ `https://reg-mirror.qiniu.com`](https://kirk-enterprise.github.io/hub-docs/#/user-guide/mirror)
* [Azure China Mirrors `https://dockerhub.azk8s.cn`](https://github.com/Azure/container-service-for-azure-china/blob/master/aks/README.md#22-container-registry-proxy)
* [Alibaba Cloud Accelerator(Login Required)](https://cr.console.aliyun.com/cn-hangzhou/mirrors)
* [Qiniu Cloud Accelerator `https://reg-mirror.qiniu.com`](https://kirk-enterprise.github.io/hub-docs/#/user-guide/mirror)
>
> Since some mirror services may be down sometimes, it is recommended to configure multiple mirrors simultaneously.
> Docker Docker
> Most of the cloud service giants in China provide Docker image acceleration services, you can choose acceleration services based on which platform you are running Docker on. For more detailed information, you may refer to their official documents.
We take Azure China Mirrors `https://dockerhub.azk8s.cn` as an example to introduce more.
Azure `https://dockerhub.azk8s.cn`
### Ubuntu 16.04+Debian 8+CentOS 7
使 [systemd](https://www.freedesktop.org/wiki/Software/systemd/) 的系统,请在 `/etc/docker/daemon.json` 中写入如下内容(如果文件不存在请新建该文件)
For Operating Systems using [systemd](https://www.freedesktop.org/wiki/Software/systemd/), please write the following contents inside `/etc/docker/daemon.json`. And if the file does not exist, please create the file.
```json
{
@ -24,41 +25,40 @@
]
}
```
> Note, make sure the file is in valid json format, otherwise Docker will be unable to start.
> json Docker
Then restart the service.
```bash
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
```
> `docker.service` `--registry-mirror=https://dockerhub.azk8s.cn`
> Note: if you refered to the old tutorial previously, and modified the content of `docker.service`, please remove the added contents(`--registry-mirror=https://dockerhub.azk8s.cn`).
### Windows 10
使 Windows 10 Docker `Settings` `Daemon` `Registry mirrors` `https://dockerhub.azk8s.cn` `Apply` Docker
For windows 10, choose `Settings` in the list after click on the Docker icon at the right-bottom of the desktop. Then choose `Daemon`, and inside the `Registry mirrors`, fill in `https://dockerhub.azk8s.cn`. And finally click `Apply` to save and apply the changes.
### macOS
使 macOS Docker Desktop -> Perferences... -> Daemon -> Registry mirrors `https://dockerhub.azk8s.cn` `Apply & Restart` Docker
For macOS users, click Docker Desktop icon at the task bar -> Perferences... -> Daemon -> Registry mirrors. Then fill in the accelerator address `https://dockerhub.azk8s.cn` in the list. After the modification, click on `Apply & Restart` button, Docker will restart and apply the new mirror address.
###
### Verify the Accelerator
`$ docker info`
After executing `$docker info`, if you can see the following result, you have successfully configured it.
```bash
Registry Mirrors:
https://dockerhub.azk8s.cn/
```
### gcr.io
### gcr.io Mirror
`gcr.io/*` `gcr.io/<repo-name>/<image-name>:<version>` `gcr.azk8s.cn/<repo-name>/<image-name>:<version>` ,
In China, we cannot fetch `gcr.io/*` mirrors direclty, but we can replace `gcr.io/<repo-name>/<image-name>:<version>` with `gcr.azk8s.cn/<repo-name>/<image-name>:<version>`, for example
```bash
# $ docker pull gcr.io/google_containers/hyperkube-amd64:v1.9.2
$ docker pull gcr.azk8s.cn/google_containers/hyperkube-amd64:v1.9.2
```
```