Skip to content

Commit 49a90c4

Browse files
committed
Update: 更新文章
1 parent 629c11a commit 49a90c4

File tree

6 files changed

+60
-7
lines changed

6 files changed

+60
-7
lines changed

.vitepress/sidebar/learn/docker.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ const dockerItem: SidebarType[] = [
1010
icon: '🔸',
1111
text: 'Docker 常用命令',
1212
link: '/learn/deploy/docker/docker_common_command'
13+
},
14+
{
15+
icon: '🔹',
16+
text: 'docker配置国内镜像(Linux版)',
17+
link: '/learn/deploy/docker/docker_configure_domestic_image'
1318
}
1419
];
1520

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"@element-plus/icons-vue": "^2.3.1",
1414
"@vueuse/core": "^12.2.0",
1515
"artalk": "^2.9.1",
16+
"dayjs": "^1.11.13",
1617
"element-plus": "^2.9.1",
1718
"floating-vue": "^5.2.2",
1819
"lodash-es": "^4.17.21",

package/components/NanoComment/index.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<template>
2-
<div v-if="type === 'artalk' && visible" class="relative w-full h-a my-12">
3-
<div class="h-1px w-full bg-gray-300"/>
4-
<strong class="block text-[calc(var(--base-size)*1.2)]! my-4!">大佬~留个评论吧~</strong>
2+
<div v-if="type === 'artalk' && visible" class="relative w-full h-a my-12 p-6 bg-#F7F8FA rounded-6px">
3+
<strong class="block text-[calc(var(--base-size)*1.25)]! mb-4!">大佬~留个评论吧~</strong>
54
<div id="comment"/>
65
</div>
76
</template>

package/components/NanoMain/index.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,13 @@
2424
>
2525
<Content/>
2626
</article>
27+
<div
28+
class="flex items-center justify-end"
29+
style="padding: calc(var(--base-size) * 2.5) calc(var(--base-size) * 1.5) 0"
30+
>
31+
<span class="text-gray">最后更新于:</span>
32+
<strong class="text-slate-4">{{ dayjs(page.lastUpdated).format('YYYY-MM-DD HH:mm') }}</strong>
33+
</div>
2734
<slot name="contentAfter">
2835
<NanoComment/>
2936
</slot>
@@ -42,6 +49,7 @@
4249
import { onContentUpdated, useData, useRoute } from 'vitepress';
4350
import emitter from '../../emitter';
4451
import NotFound from 'vitepress/dist/client/theme-default/NotFound.vue';
52+
import dayjs from 'dayjs';
4553
4654
const { page } = useData();
4755
const route = useRoute();
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# docker配置国内镜像(Linux版)
2+
3+
## 编辑 Docker 配置文件
4+
5+
编辑 Docker 配置文件 `/etc/docker/daemon.json`,如果文件不存在则创建该文件。
6+
7+
```shell
8+
sudo mkdir -p /etc/docker
9+
sudo nano /etc/docker/daemon.json
10+
```
11+
12+
## 添加国内镜像地址
13+
14+
`daemon.json` 文件中添加国内镜像地址,如下所示:
15+
16+
```json
17+
{
18+
"registry-mirrors": [
19+
"https://docker.m.daocloud.io",
20+
"https://dockerproxy.com",
21+
"https://docker.nju.edu.cn",
22+
"https://docker.mirrors.ustc.edu.cn"
23+
]
24+
}
25+
```
26+
27+
如果上面的镜像地址无法使用,可以尝试其他镜像地址。
28+
29+
## 重启 Docker 服务
30+
31+
编辑完成后,重启 Docker 服务使配置生效。
32+
33+
```shell
34+
sudo systemctl daemon-reload
35+
sudo systemctl restart docker
36+
```
37+
38+
## 验证配置是否生效
39+
40+
运行以下命令验证配置是否生效:
41+
42+
```shell
43+
docker pull hello-world
44+
```

src/learn/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
---
2-
comment: false
3-
---
4-
51
# 学习备忘录
62

73
## 为什么有这个模块

0 commit comments

Comments
 (0)