docker_practice/install/mirror.md

65 lines
2.7 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

##
Docker Hub
* [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)
>
> Docker Docker
Azure `https://dockerhub.azk8s.cn`
### Ubuntu 16.04+Debian 8+CentOS 7
使 [systemd](https://www.freedesktop.org/wiki/Software/systemd/) 的系统,请在 `/etc/docker/daemon.json` 中写入如下内容(如果文件不存在请新建该文件)
```json
{
"registry-mirrors": [
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com"
]
}
```
> json Docker
```bash
$ sudo systemctl daemon-reload
$ sudo systemctl restart docker
```
> `docker.service` `--registry-mirror=https://dockerhub.azk8s.cn`
### Windows 10
使 Windows 10 Docker `Settings` `Daemon` `Registry mirrors` `https://dockerhub.azk8s.cn` `Apply` Docker
### macOS
使 macOS Docker Desktop -> Perferences... -> Daemon -> Registry mirrors `https://dockerhub.azk8s.cn` `Apply & Restart` Docker
###
`$ docker info`
```bash
Registry Mirrors:
https://dockerhub.azk8s.cn/
```
### gcr.io
`gcr.io/*` `gcr.io/<repo-name>/<image-name>:<version>` `gcr.azk8s.cn/<repo-name>/<image-name>:<version>` ,
```bash
# $ docker pull gcr.io/google_containers/hyperkube-amd64:v1.9.2
$ docker pull gcr.azk8s.cn/google_containers/hyperkube-amd64:v1.9.2
```