docker_practice/install/mirror.md

83 lines
2.9 KiB
Go
Raw Normal View History

#
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)
2019-01-01 09:59:58 +00:00
* [()](https://cr.console.aliyun.com/cn-hangzhou/mirrors)
* [ `https://reg-mirror.qiniu.com`](https://kirk-enterprise.github.io/hub-docs/#/user-guide/mirror)
>
2018-06-28 03:15:25 +00:00
> Docker Docker
2018-07-10 00:07:31 +00:00
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"
]
}
```
2017-12-03 02:27:36 +00:00
> 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` `Docker Engine` json `Apply & Restart` Docker
```json
{
"registry-mirrors": [
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com"
]
}
```
## macOS
使 macOS Docker Desktop -> `Perferences` `Docker Engine` json `Apply & Restart` Docker
```json
{
"registry-mirrors": [
"https://dockerhub.azk8s.cn",
"https://reg-mirror.qiniu.com"
]
}
```
##
`$ 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
2019-08-31 10:35:14 +00:00
# $ docker pull gcr.io/google_containers/hyperkube-amd64:v1.9.2
2019-08-31 10:35:14 +00:00
$ docker pull gcr.azk8s.cn/google_containers/hyperkube-amd64:v1.9.2
```