From 88a4910def2d920bd1328402560cb6acf1aaffa3 Mon Sep 17 00:00:00 2001 From: wenyongda Date: Tue, 25 Nov 2025 10:28:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/_posts/Docker.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/_posts/Docker.md b/source/_posts/Docker.md index 12abd2a..e369e47 100644 --- a/source/_posts/Docker.md +++ b/source/_posts/Docker.md @@ -747,6 +747,15 @@ Build Cache 12 0 0B 0B 执行 **docker system prune -a** 命令之后,Docker 占用的磁盘空间减少了很多 +```shell +du -sh /var/lib/docker/containers/* | sort -rh | head -5 +cd /var/lib/docker/containers/eb52fa7d62ce52ab7a6153636a0ec89c7c8dce6f1a94dc86b2fbf0702368e82 + +truncate -s 0 *-json.log +``` + + + ## 手动清理 Docker 镜像/容器/数据卷 对于旧版的 Docker(版本 1.13 之前),是没有 docker system 命令的,因此需要进行手动清理。这里给出几个常用的命令