-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
60 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/learn/deploy/docker/docker_configure_domestic_image.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# docker配置国内镜像(Linux版) | ||
|
||
## 编辑 Docker 配置文件 | ||
|
||
编辑 Docker 配置文件 `/etc/docker/daemon.json`,如果文件不存在则创建该文件。 | ||
|
||
```shell | ||
sudo mkdir -p /etc/docker | ||
sudo nano /etc/docker/daemon.json | ||
``` | ||
|
||
## 添加国内镜像地址 | ||
|
||
在 `daemon.json` 文件中添加国内镜像地址,如下所示: | ||
|
||
```json | ||
{ | ||
"registry-mirrors": [ | ||
"https://docker.m.daocloud.io", | ||
"https://dockerproxy.com", | ||
"https://docker.nju.edu.cn", | ||
"https://docker.mirrors.ustc.edu.cn" | ||
] | ||
} | ||
``` | ||
|
||
如果上面的镜像地址无法使用,可以尝试其他镜像地址。 | ||
|
||
## 重启 Docker 服务 | ||
|
||
编辑完成后,重启 Docker 服务使配置生效。 | ||
|
||
```shell | ||
sudo systemctl daemon-reload | ||
sudo systemctl restart docker | ||
``` | ||
|
||
## 验证配置是否生效 | ||
|
||
运行以下命令验证配置是否生效: | ||
|
||
```shell | ||
docker pull hello-world | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
--- | ||
comment: false | ||
--- | ||
|
||
# 学习备忘录 | ||
|
||
## 为什么有这个模块 | ||
|