Skip to content

Commit 514d858

Browse files
author
Jim Galasyn
authored
Add use case for China registry mirror (docker#3682)
1 parent 7a0b00a commit 514d858

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

registry/recipes/mirror.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,3 +100,33 @@ to make the change persistent.
100100
```
101101

102102
Save the file and restart Docker for the change to take effect.
103+
104+
## Use case: the China registry mirror
105+
106+
The URL of the registry mirror for China is `registry.docker-cn.com`. You can
107+
pull images from this mirror just like you do for other registries by
108+
specifying the full path, including the registry, in your `docker pull`
109+
command, for example:
110+
111+
```bash
112+
$ docker pull registry.docker-cn.com/library/ubuntu
113+
```
114+
115+
You can configure the Docker daemon with the `--registry-mirror` startup
116+
parameter:
117+
118+
```bash
119+
$ docker --registry-mirror=https://registry.docker-cn.com -d
120+
```
121+
122+
Or you can add "https://registry.docker-cn.com" to the `registry-mirrors`
123+
array in `/etc/docker/daemon.json` to pull from the China registry mirror
124+
by default.
125+
126+
```json
127+
{
128+
"registry-mirrors": ["https://registry.docker-cn.com"]
129+
}
130+
```
131+
132+
Save the file and restart Docker for the change to take effect.

0 commit comments

Comments
 (0)