Skip to content

Commit

Permalink
Update: 更新文章
Browse files Browse the repository at this point in the history
  • Loading branch information
T-miracle committed Jan 13, 2025
1 parent 629c11a commit 49a90c4
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .vitepress/sidebar/learn/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ const dockerItem: SidebarType[] = [
icon: '🔸',
text: 'Docker 常用命令',
link: '/learn/deploy/docker/docker_common_command'
},
{
icon: '🔹',
text: 'docker配置国内镜像(Linux版)',
link: '/learn/deploy/docker/docker_configure_domestic_image'
}
];

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"@element-plus/icons-vue": "^2.3.1",
"@vueuse/core": "^12.2.0",
"artalk": "^2.9.1",
"dayjs": "^1.11.13",
"element-plus": "^2.9.1",
"floating-vue": "^5.2.2",
"lodash-es": "^4.17.21",
Expand Down
5 changes: 2 additions & 3 deletions package/components/NanoComment/index.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<template>
<div v-if="type === 'artalk' && visible" class="relative w-full h-a my-12">
<div class="h-1px w-full bg-gray-300"/>
<strong class="block text-[calc(var(--base-size)*1.2)]! my-4!">大佬~留个评论吧~</strong>
<div v-if="type === 'artalk' && visible" class="relative w-full h-a my-12 p-6 bg-#F7F8FA rounded-6px">
<strong class="block text-[calc(var(--base-size)*1.25)]! mb-4!">大佬~留个评论吧~</strong>
<div id="comment"/>
</div>
</template>
Expand Down
8 changes: 8 additions & 0 deletions package/components/NanoMain/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
>
<Content/>
</article>
<div
class="flex items-center justify-end"
style="padding: calc(var(--base-size) * 2.5) calc(var(--base-size) * 1.5) 0"
>
<span class="text-gray">最后更新于:</span>
<strong class="text-slate-4">{{ dayjs(page.lastUpdated).format('YYYY-MM-DD HH:mm') }}</strong>
</div>
<slot name="contentAfter">
<NanoComment/>
</slot>
Expand All @@ -42,6 +49,7 @@
import { onContentUpdated, useData, useRoute } from 'vitepress';
import emitter from '../../emitter';
import NotFound from 'vitepress/dist/client/theme-default/NotFound.vue';
import dayjs from 'dayjs';
const { page } = useData();
const route = useRoute();
Expand Down
44 changes: 44 additions & 0 deletions src/learn/deploy/docker/docker_configure_domestic_image.md
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
```
4 changes: 0 additions & 4 deletions src/learn/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
comment: false
---

# 学习备忘录

## 为什么有这个模块
Expand Down

0 comments on commit 49a90c4

Please sign in to comment.