forked from TrueCloudLab/distribution
Add use case for China registry mirror (#3682)
This commit is contained in:
parent
6508f123f8
commit
c60e7107fa
1 changed files with 30 additions and 0 deletions
|
@ -100,3 +100,33 @@ to make the change persistent.
|
||||||
```
|
```
|
||||||
|
|
||||||
Save the file and restart Docker for the change to take effect.
|
Save the file and restart Docker for the change to take effect.
|
||||||
|
|
||||||
|
## Use case: the China registry mirror
|
||||||
|
|
||||||
|
The URL of the registry mirror for China is `registry.docker-cn.com`. You can
|
||||||
|
pull images from this mirror just like you do for other registries by
|
||||||
|
specifying the full path, including the registry, in your `docker pull`
|
||||||
|
command, for example:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker pull registry.docker-cn.com/library/ubuntu
|
||||||
|
```
|
||||||
|
|
||||||
|
You can configure the Docker daemon with the `--registry-mirror` startup
|
||||||
|
parameter:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ docker --registry-mirror=https://registry.docker-cn.com -d
|
||||||
|
```
|
||||||
|
|
||||||
|
Or you can add "https://registry.docker-cn.com" to the `registry-mirrors`
|
||||||
|
array in `/etc/docker/daemon.json` to pull from the China registry mirror
|
||||||
|
by default.
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"registry-mirrors": ["https://registry.docker-cn.com"]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Save the file and restart Docker for the change to take effect.
|
Loading…
Reference in a new issue