Skip to content

Commit 1acf80a

Browse files
author
liuxinwei
committed
+docker
1 parent 2196df0 commit 1acf80a

File tree

5 files changed

+49
-52
lines changed

5 files changed

+49
-52
lines changed

doc/conf.py

Lines changed: 12 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
2424
# ones.
2525
extensions = [
26-
"ablog",
26+
# "ablog",
2727
"xyzstyle",
2828
'myst_nb',
2929
'sphinx.ext.intersphinx',
@@ -165,17 +165,17 @@
165165
# "single_page": True,
166166
}
167167

168-
html_sidebars = {
169-
"*": ["sidebar-nav-bs.html", "sidebar-ethical-ads.html"],
170-
"posts/**": [
171-
"ablog/postcard.html",
172-
"ablog/recentposts.html",
173-
"ablog/tagcloud.html",
174-
"ablog/categories.html",
175-
"ablog/archives.html",
176-
"searchbox.html",
177-
],
178-
}
168+
# html_sidebars = {
169+
# "*": ["sidebar-nav-bs.html", "sidebar-ethical-ads.html"],
170+
# "posts/**": [
171+
# "ablog/postcard.html",
172+
# "ablog/recentposts.html",
173+
# "ablog/tagcloud.html",
174+
# "ablog/categories.html",
175+
# "ablog/archives.html",
176+
# "searchbox.html",
177+
# ],
178+
# }
179179

180180
html_context = {
181181
"github_user": "xinetzone",
@@ -207,39 +207,3 @@ def setup(app):
207207

208208
# -- 自定义网站的标题 --------------
209209
# html_title = '动手学习 Python'
210-
211-
# ========== ABlog 配置 ============================================================
212-
blog_path = "posts"
213-
blog_post_pattern = "posts/*.md"
214-
blog_baseurl = "https://xinetzone.github.io/d2py"
215-
fontawesome_included = True
216-
post_auto_image = 1
217-
post_auto_excerpt = 2
218-
bibtex_bibfiles = ["references.bib"]
219-
bibtex_reference_style = "author_year"
220-
# -- 博客作者、语言和位置 -------------------------------------------------
221-
222-
# 一个作者名字的字典,映射到作者的完整显示名称和链接。
223-
# 字典的键值应该在 ``post`` 指令中使用,以指代作者。默认是 ``{}``。
224-
blog_authors = {
225-
"lxw": ("刘新伟", None),
226-
}
227-
228-
# 语言代码名称的字典,映射到这些语言的完整显示名称和链接。
229-
# 类似于 :confval:`blog_authors`,
230-
# 字典的键应该在 `post` 指令中使用,以指代位置。默认是 `{}`。
231-
blog_languages = {'zh': ('Chinese', None), 'en': ('English', None)}
232-
233-
# 默认作者的名字
234-
blog_default_author = "lxw"
235-
# 默认语言的代码名称
236-
blog_default_language = 'zh'
237-
# 在 blog_locations 中定义的默认位置的名称。
238-
# blog_default_location = None
239-
240-
# -- 博客帖子相关 --------------------------------------------------------
241-
242-
# 帖子的日期格式。默认 ``'%b %d, %Y'``
243-
# ``datetime.date.strftime()`` 的参数
244-
post_date_format = '%c'
245-
post_date_format_short = '%b %d, %Y'

doc/explore/docker/faqs.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Docker 常见问题
2+
3+
## /var/lib/docker/overlay2 占用很大,清理Docker占用的磁盘空间,迁移 /var/lib/docker 目录
4+
5+
- 查看磁盘 `/var/lib/docker/` 使用情况:
6+
```bash
7+
sudo du -hs /var/lib/docker/
8+
```
9+
- `docker system df` 查看 Docker 的磁盘使用情况:
10+
- `docker system prune` 命令可以用于清理磁盘,删除关闭的容器、无用的数据卷和网络,以及 dangling 镜像(即无 tag 的镜像)。
11+
- 迁移 `/var/lib/docker` 目录:
12+
1. `systemctl stop docker` 停止 docker 服务
13+
2. 创建新的 docker 目录,执行命令 `df -h`,找一个大的磁盘。比如,`/home/`,并构建 `/home/docker/lib`
14+
3. 迁移 `/var/lib/docker` 目录下面的文件到 `/home/docker/lib`:
15+
```bash
16+
rsync -avz /var/lib/docker /home/docker/lib/
17+
```
18+
4. 配置 `/etc/systemd/system/docker.service.d/devicemapper.conf`。查看 `devicemapper.conf` 是否存在。如果不存在,就新建。
19+
```bash
20+
sudo mkdir -p /etc/systemd/system/docker.service.d/
21+
sudo vi /etc/systemd/system/docker.service.d/devicemapper.conf
22+
```
23+
5. 然后在 `devicemapper.conf` 写入:(同步的时候把父文件夹一并同步过来,实际上的目录应在 `/home/docker/lib/docker`
24+
```
25+
[Service]
26+
ExecStart=
27+
ExecStart=/usr/bin/dockerd --graph=/home/docker/lib/docker
28+
```
29+
6. 重新加载 docker:
30+
```bash
31+
systemctl daemon-reload
32+
systemctl restart docker
33+
systemctl enable docker
34+
```
35+
7. 确定容器没问题后删除 `/var/lib/docker/` 目录即可。

doc/explore/docker/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@
77
88
quickref
99
dockerfile-help
10-
```
10+
faqs
11+
```

doc/index.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
88
explore/index
99
compile/index
10-
posts/index
1110
inventory/index
1211
drafts/index
1312
chaos/index

doc/posts/index.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)