Skip to content

Commit 4989efa

Browse files
committedMar 15, 2025·
Ch08: Redirect registry mirror guide to yeasy gitbook
1 parent 0a91da8 commit 4989efa

File tree

1 file changed

+2
-32
lines changed

1 file changed

+2
-32
lines changed
 

‎docs/Ch08/index.md

+2-32
Original file line numberDiff line numberDiff line change
@@ -74,39 +74,9 @@ $ sudo adduser 用户名 docker
7474

7575
### 配置 Registry Mirror(可选,推荐) {#setup-registry-mirror}
7676

77-
!!! warning "本节内容可能随时过时"
77+
!!! tip "本节操作请参考其他文档"
7878

79-
维护公共使用的 Docker Hub pull-through cache (registry mirror) 需要**非常高的运维成本**,因而有很多服务在之前可以使用,但是之后被迫关闭或转为非公开。你可以参考 <https://yeasy.gitbook.io/docker_practice/install/mirror#bu-zai-ti-gong-fu-wu-de-jing-xiang> 获取目前可能可以使用的 registry mirror(镜像加速器)。
80-
81-
Docker 默认从 Docker Hub 上拖取所需要的镜像。但由于网络原因,拖取的过程可能会比较慢。一些服务在中国提供了 Docker Hub 的镜像(反代缓存)。以下内容以网易云与百度云为例。
82-
83-
为了使用这些 Docker Hub 镜像,在 Debian/Ubuntu 上,可以编辑 `/etc/docker/daemon.json` 文件(如果文件不存在,请新建一个),写入以下内容。
84-
85-
```json
86-
{
87-
"registry-mirrors": [
88-
"https://hub-mirror.c.163.com",
89-
"https://mirror.baidubce.com"
90-
]
91-
}
92-
93-
```
94-
95-
使用 `sudo systemctl restart docker` 命令重启 Docker 服务后,再次运行 `docker info` 命令,可以看到如下输出:
96-
97-
```text
98-
Registry Mirrors:
99-
https://hub-mirror.c.163.com/
100-
https://mirror.baidubce.com/
101-
```
102-
103-
如果你看到了上面的输出,说明你的 Docker Registry Mirror 已经配置好了。
104-
105-
!!! info "如果你是科大校园网用户"
106-
107-
科大镜像站的 Docker Hub registry mirror 目前仅对校园网开放,地址为 `https://docker.mirrors.ustc.edu.cn/`。如果在使用以上获取的 registry mirror 时遇到问题,可以切换。需要注意由于 2020 年 11 月之后 Docker Hub 的访问速率限制,使用时可能会出现间歇性的问题。
108-
109-
详细信息见科大镜像站 [Docker Hub 源使用帮助](https://mirrors.ustc.edu.cn/help/dockerhub.html)。
79+
你可以参考 <https://yeasy.gitbook.io/docker_practice/install/mirror> 获取目前可能可以使用的 registry mirror。
11080

11181
### 使用 Hello World 测试 Docker 安装 {#verify-docker-setup}
11282

0 commit comments

Comments
 (0)
Please sign in to comment.