File tree Expand file tree Collapse file tree 6 files changed +60
-7
lines changed
Expand file tree Collapse file tree 6 files changed +60
-7
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 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 >
Original file line number Diff line number Diff line change 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 >
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 ();
Original file line number Diff line number Diff line change 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+ ```
Original file line number Diff line number Diff line change 1- ---
2- comment : false
3- ---
4-
51# 学习备忘录
62
73## 为什么有这个模块
You can’t perform that action at this time.
0 commit comments