docker的overlay占用太多硬盘空间?

in 云服务器 with 0 comment

每次查看VPS的硬盘时,总会发现DOCKER的OVERLAY占用了太多的硬盘空间。
输入df -h如下:

Filesystem      Size  Used Avail Use% Mounted on
tmpfs           794M  1.9M  792M   1% /run
/dev/vda1        58G   38G   17G  70% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/447ea3bd59841c5e4a13bd68ed743cb332a0f6a44420abc07ffb114af6bc033d/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/c9b693b56db2c52094fe8cdbd7d1633923f70903dd6d7f6ec81fca6e57a4f243/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/906d3184d24b978f4680ef74482510be06116d247802ce99d4766ff87447d0ee/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/ec898b8a1a546492e3b7e5f2a4f58d0b52f4a4ade2a61e194344a36a14a011c8/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/36cf040adc14a7ec82aa1293900699ca96c1ece2a18099dba9e5daedc8e7d981/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/d17adac73b20997081bd0ccc3d56f554f4240909bfb03953427a3e8b958bffd9/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/16acb0dbda2b7bc8df8a2ef22e931721d1a3327efe7b3b8853deab1583bbf9db/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/0d0d9ed3377319700c61e0e834adfa69dcc16e9653337a292ac8c981ca7ec626/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/ec39238400aec047e0153e5c479e5b03a3a8deea0fac980bb042b69efe1813a7/merged
overlay          58G   38G   17G  70% /var/lib/docker/overlay2/dc44bee9f6d30927966d3e0b4076772704d5f6b3179de1f4478257752f192354/merged
tmpfs           794M     0  794M   0% /run/user/0

看这个VPS,58G的空间,这个overlay占用了几十G。我们想办法解决一下。

直接清理无效的、没有使用的镜像、日志、卷等

docker system prune -a -f

这个要谨慎点用,后面的 -a -f 就是所有、强制的意思。
你看我这个,直接删除了一堆的没使用的镜像、容器和相关资源。

root@xxxx:~# docker system prune -a -f
Deleted Containers:
9361c669507ebeef26b46aef065fcd9fa59e32a7215b788f7b5c7e7745d2030c
89ae4656ef734502f830b96af64bfb6dc9c32f8fda1e8325cbbbd3f293afb618
89c32b734805f09124dcc8cc0e708c2971befd39037a17e2792fbb8d9fdcef1f

Deleted Networks:
masterlab-docker_docker_net
alist_default
netdata_default

Deleted Images:
untagged: apitable/init-appdata:latest
untagged: apitable/init-appdata@sha256:3deac5cdb1177908396d5732434293a9fcd9591866a6783aa0e3ed8ea2d37ccc
deleted: sha256:83c6cd1387762a8c4b7ecee7dbefe22a6dc34637a510c8fc3ca3ee240a24e3c1
deleted: sha256:07c092de1b60c46ab9b61cbde18959828c64f0d9e84ca2b3143cba928f29c7e1
deleted: sha256:152e53e6b2ddb72215d30100e32d5f41ae6886d0c2cc9a860350faaad1e4de87
deleted: sha256:b4d5330f9e315d4dd262bac01b218a3096f65bf57a8bbbcb16009bb37ad47d64
untagged: apitable/init-appdata@sha256:fa28139cd4b1a0e9e8e814eb036f7d8e6190407191ce07be47c596a93bb432ad
deleted: sha256:dc7baf8c6e9cee1f5f57acda8e6525b61611948780d13911a54b6e4784ece8dc
deleted: sha256:81b2dfb9dfbae02df9df5e91e3996567e25548b13b11cf4910459d66bad57cdd
deleted: sha256:bbd20008b8cba80a508959d4c58302af8a53391012a1350be514ac8505825e09
deleted: sha256:3d5bf07986d6ee4c0390c47832e07832e17a4c17dfe14d1ad4ea9bd62c79e791
untagged: mysql:5.7
untagged: mysql@sha256:f57eef421000aaf8332a91ab0b6c96b3c83ed2a981c29e6528b21ce10197cd16
deleted: sha256:dd6675b5cfea17abb655ea8229cbcfa5db9d0b041f839db0c24228c2e18a4bdf
deleted: sha256:ce931a23976217d9a54389e972eb3fc823ec4c2ef51ff712f6330437bd7a373a
deleted: sha256:64eb3560e160f706ef4994cb38a97d1ce32a219e547ead81fd51766d46c5e1c2
deleted: sha256:9e009673657831f462ffdacbf099a070f0bb03cbb105483c69470a25ab87efe0
deleted: sha256:a37428431f1f5ebda54ff32a40299e87a2e5e9b867bfb9c1e6199f9d04850a9a
deleted: sha256:b5463af91376b3d4772113805dbce79805129326c301a80947cbfd43c8069898
deleted: sha256:c0a975af561fdd0b68965ca9c572d91244b6dff6124b6a4d66b3188c0cb72d9f
deleted: sha256:38700ee823d5d82b695bb7d553973c0106384a6984b553e2af6d6fb9545d9636
deleted: sha256:7cfca860605c4f16b1f255ebd51e2c801e00ac16997c7840428f88a2246cfebb
deleted: sha256:0d8a62cb129e3cebaaef51f977b670282775d48a9cdaa021a0cb5ed73243a446
deleted: sha256:66e6e199acb7395ac9a10b125841eafdfa3f80a1a3f710e0a0a9519da228bce2
deleted: sha256:e74a57638021cebbbe0dda98a27675f9b53258050ee2c29c3e5fb7fb1f3ab533
untagged: apitable/init-db:latest
untagged: apitable/init-db@sha256:24bb77c73870d236133a3f02e666a77be8134611e8bc2e24901551c8dfadc052
deleted: sha256:e424593c114a3c1d072134188d56f614cf6c330273592cb36c4c5cf9adaf4d18
deleted: sha256:2b28aad0b7ed56cda8e07db6e285fead824afe2ebae136ce50fd8f7d7147397a
deleted: sha256:ed509aa05f97ed9ad9e55dfec63ef5205be24ad69015a362ad652762e5df19db
deleted: sha256:5dda146cdbaf760ce78878e30abbbb03fc94681a1b7a6661e406631b4f24d0c9
deleted: sha256:073de7dae54dab3225735ca358695dfd3aa82621b1745d87ee167ea567604915
deleted: sha256:4ba8685cea5c5447e446d5725cc4ab16c3347191b7929cb669f4de29cec474d6
deleted: sha256:0c19f73562df63c629376ff415a1ef883481149e0cb9b12bb663cdb003f04092
deleted: sha256:53abeae02aacd17eb502eacd5d2d54e68be5b91074a32528d1d8435322bea647
deleted: sha256:af8a62bad7fa86538358791c7146c4b0d5c8c8b2853613a0e92379a7e2fa8470
deleted: sha256:9ad1bd27a077edc8f9363b26ccb87ab9c719821c171672bf559b0e09904e3c01
deleted: sha256:6c6b0ab666a50d4bac32eb4447491e0f3f5783a830e256d84b95c05c8f877e2f
deleted: sha256:735c9c8d25e2e47747f24ecfa594ec3790eac86661ea6c6bae8506183acba82c
deleted: sha256:5b42e9ce6455ece9e9a94b34de705d7cdd22071ffa963d0cf34ebab3be7183b8
deleted: sha256:b3ae22dca2ff90d255e2d6d1d66afd43658e72fd2946ce470259af2c132ce208
deleted: sha256:073cb6babcc5e084a80f2c06da74bfbd0eadf5f4d5c9942b9bf34ab453a2f896
deleted: sha256:0e08a74c669ab2c5cb001f1050973712de3efdd2ea6932916cd4026f7e5a0586
deleted: sha256:bec3aa8bbbf532800f161e0db7901e2baf7b18ebd2817d2ab85d9300a3cab216
deleted: sha256:c74427e1409872f21d2a8c2ea7d69d8527bbcbde255d2f34f2b283956555ab5d
deleted: sha256:2d7d8d820556e49bca1f21511fc2eeeba9716717f164acf5e2554311990df245
deleted: sha256:a74d09532631edc1735170ef151d92449cefb29a650c9fa9e69cd37d6adfdda8
deleted: sha256:6a8f667e2717359e6aee7dd3da64e9ebc6ae038846f6def72c59a3684a413258
deleted: sha256:ac965f0458baf9a2a86674698b988a6bb157f08aca8583103d5fa4ac1183f71a
deleted: sha256:52a05a6b5f6bca8f726a33948e3cd483dc563fe1280f022d057225401819d1f9
deleted: sha256:f18b02b14138b6f9808f9843cc645e2edd64b02ca1c87e671355f56d1b4b5ec6
untagged: netdata/netdata:edge
untagged: netdata/netdata@sha256:0b158da2d13129c4baa0c78b59c9e863703480e86957391f2082e5aecc8e9f1c
deleted: sha256:3d59d9bf7c6516734f5579a49e0e26a93a76c88c08d99ce1c91373aa6efba1b7
deleted: sha256:6e90dd22223c730f06202981bc40fb1afc4cf2e3144a2baea67f23abbfcfff33
deleted: sha256:f5ece465b54e49bd42f2f0e1221c73583287de12464085edb9d6ba63fef7da84
deleted: sha256:8982b282aa3ac41f125f0a6f762ff2c3d31d2007cfce1f30e6e77c1a2afbd14d
deleted: sha256:be59250cc3593196fa54784c8b413ce01b10a114d1c8e94673fd31ae51bfe510
untagged: xhofe/alist:main
untagged: xhofe/alist@sha256:5477c3e7cdd4137ab2875b8012c2c96eaf581891e880ed56153f11194072ee6d
deleted: sha256:343cc1fce0f2c85ed83d43b11c204970b72c1f6cf183e1d150a140e284ce3ba7
deleted: sha256:3d2c7923d66da1449cc58c6ae835a6dba8e4c7581605595a29e9c626a1451535
deleted: sha256:0475837db55cdbf8fe828fe6bfba2144ab87d67d81d8ae0467002d7157c7c2e0
deleted: sha256:2acee77d73b8a31a467fd0bb1962086092137ab1ae7e42b0cc7c8c06f11c77ea
deleted: sha256:f872b29664cb3e7565d2d6a6f286e40b2f76074838a45f7a93ea82287f70fba4
deleted: sha256:12cf4b26316aa5c30d6fcf62388037d46e3fb19fc4f727f73898200b71217d6f
untagged: gopeak/masterlab:php-fpm-74
untagged: gopeak/masterlab@sha256:40f3d1715a7801531d99aa758d421f4664c75f732ad2dbf366a3646007787799
deleted: sha256:55be5b95e7796f77781eff7eee4dc253059bb40e25a70a2b51912f8178eda7b4
deleted: sha256:f5c94ba88bf9112a7379d2fb27804dfebe6a273986fbca4e29f3bde71dc0c6d0
deleted: sha256:c5e1e74796de0bd35da9eb30b024fa8eb4dbdf43956dc2b36843d3ee3910f848
deleted: sha256:40e3a9f7bd6f1e6c9a02bb2604eb9bec35c1c626077e4f929d09ab65fdd51144
deleted: sha256:4007944fcf38a1f78ec81fd164596b829f501ec0192677c688bbdb38767c9867
deleted: sha256:45ac3be118407ce75a5ecd0c1bbcb660db545ca1594d74a1d95f6883ccfef7b6
deleted: sha256:3dcfe1659a10e395586c32053f6fd61da2efcca1e5e36ddf7fa9b95ddd86ba63
deleted: sha256:98280eb4ae384b1927b713af8491bdf9ce0b65c5b4c7bfbb6c71e039aff1799a
deleted: sha256:87ae86478b3d3dcb03783a262a51c8d7da5a70c9ac0746dae87bc6f3a522fbdc
deleted: sha256:bbbe3c1a3ae06f1c46d385af12b4ef025a6041129a2f7b051e7ff83903923d6e
deleted: sha256:72701c833cc8d1d614e95ba44201252588d4f742b57ea242171ee9beddf4e058
deleted: sha256:625df5536a39dd232bafefd19a6445b1541c9eb3b276919e6601e286251a9300
deleted: sha256:1ab6fdaf40c062e616889340e727e8a56c941f7647af6ff7dcae98092fa563a1
deleted: sha256:926df867e9f1b2fc8f675493c044a64c332c261765a6edc00a144b78f348e491
deleted: sha256:f34c86dc5d265b0f436f3e221fa204ef8f046435a3de554e308ca193c199a6f1
deleted: sha256:d6b6ca37231e14d20eef9b67a4fc6849b377796efe38cfad4fb2609b0bfe06ee
deleted: sha256:814bff7343242acfd20a2c841e041dd57c50f0cf844d4abd2329f78b992197f4
untagged: nginx:alpine
untagged: nginx@sha256:dd2a9179765849767b10e2adde7e10c4ad6b7e4d4846e6b77ec93f080cd2db27
deleted: sha256:8e75cbc5b25c8438fcfe2e7c12c98409d5f161cbb668d6c444e02796691ada70
deleted: sha256:f301a4112756ab559d9c78e8ed3625dab81f91803dfeabbc4f9184c878b1f3b1
deleted: sha256:d794631f2dea08ec92bc28f93ac8c1079c505aef791e86cc2bd5566904d2d581
deleted: sha256:0d2f2fd89d17527e0808abf8debc4d22c1b3670894eeb12ecee580fe05719dec
deleted: sha256:13ec71ce1944eb1de9f7fe3bbee31e4355476075b70f8b395a68d90ca849f111
deleted: sha256:8997729a28eb948a9a00aa56b19143cff03e0ced25280473fff15c461860dfa7
deleted: sha256:193b9708a46833ccb84791d3d58bf0d5428c37fc8fd80c951d3ca15cca5091c6
deleted: sha256:f1417ff83b319fbdae6dd9cd6d8c9c88002dcd75ecf6ec201c8c6894681cf2b5
untagged: redis:latest
untagged: redis@sha256:f50031a49f41e493087fb95f96fdb3523bb25dcf6a3f0b07c588ad3cdbe1d0aa
deleted: sha256:eca1379fe8b541831fd5ce4a252c263db0cef4efbfd428a94225dc020aaeb1af
deleted: sha256:21acda8c08f1a6109e2fb61ed010d368ee6581cf30128cdaab0e6b91dabffc22
deleted: sha256:aafc83c9f9299ba7a3af08ab0b1f822340278803714695fd2a96351fe89b37ea
deleted: sha256:644ab96acc6e4232dc7be6f1855b27f5f3534b17b9e9c19ae2557991b99487db
deleted: sha256:6e75f4867056adfca8dfafbb0e94a525064797e4f0a106bca817b5afce47af73
deleted: sha256:84e4c46eefa83bc327e4e356365ec03a3ee1f691d181235e5b69e36663f7dd57
deleted: sha256:ed7b0ef3bf5bbec74379c3ae3d5339e666a314223e863c70644f7522a7527461

Total reclaimed space: 2.689GB

最后显示出释放出来2.689G的空间。

再使用命令查看一下docker里的资源占用情况

root@XXXX:~# docker system df
TYPE            TOTAL     ACTIVE    SIZE      RECLAIMABLE
Images          11        11        4.788GB   0B (0%)
Containers      11        11        4.196GB   0B (0%)
Local Volumes   12        1         476.3MB   475.6MB (99%)
Build Cache     0         0         0B        0B

进容器目录清理日志

这个docker里的日志,时间一长,就积累得非常多了,这时就需要清理一下。
进入 /var/lib/docker/

cd /var/lib/docker

查看一下各文件和文件夹的大小

root@xxxx:/var/lib/docker# du -sh *
116K    buildkit
12G     containers
4.0K    engine-id
23M     image
164K    network
19G     overlay2
16K     plugins
4.0K    runtimes
4.0K    swarm
4.0K    tmp
438M    volumes

看到这个containers里,占12G,那个overlay2,用19G,这下就知道怎么搞了。还是用上面的进入命令和查大小命令,反复的找最占空间的文件,想办法缩小他的大小。

root@xxxx:/var/lib/docker/containers# du -sh *
164K    0c4bf01ad1e5e7f02d92d94eebc687d49df7f44f67a474ed4198f33d02b27401
692K    2650ba602f3fc3a38c77599730636366e96c7589557c33377ec40ab65b859c27
490M    330c820553e1676e5134925591a3855fe977b7c682a5557f19b0593fae4a5507
76K     575eec7fce89d70e529c80e7f2ae2eb547f9c6ca4b61947771ae8b5ae9504792
52M     741508a5a4dd7148b2fc8a8f63b9b308ad2f832efb40bfc4fefa2da7efcfc1cd
464K    8cb260b82d103567d346a4aee752d2f4c16541185aea68bc924e37ce4993eeb8
185M    a18f8d3dc071f2b869fa44fa6d80309bd056bf88186d77b0ac950a1ee405cc67
104K    a3206e0b161e082b9977805807a84398fe831a1b7e685c3cd9a73a69fd09891c
40K     d7e0c38a52b6b5336fca129a6b763f43c753acca2bdad2bc35d2e97be3576e1d
11M     dd30506aefb05b2a56d621628659b47769167015995ac877927f2f291c559e82
11G     e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e

root@xxxx:/var/lib/docker/containers# cd e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e/

root@xxxx:/var/lib/docker/containers/e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e# du -sh *
4.0K    checkpoints
8.0K    config.v2.json
11G     e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e-json.log
4.0K    hostconfig.json
4.0K    hostname
4.0K    hosts
4.0K    mounts
4.0K    resolv.conf
4.0K    resolv.conf.hash

这下找到这个日志文件了,11G,真的是。。。

root@xxxx:/var/lib/docker/containers/e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e# > *-json.log
root@xxxx:/var/lib/docker/containers/e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e# du -sh *
4.0K    checkpoints
8.0K    config.v2.json
4.0K    e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e-json.log
4.0K    hostconfig.json
4.0K    hostname
4.0K    hosts
4.0K    mounts
4.0K    resolv.conf
4.0K    resolv.conf.hash

一条命令,舒爽了。

清理overlay2目录

再去overlay2文件夹看看

root@xxxx:/var/lib/docker/containers/e44b60f78d0bc168f30deeef07d2cee35f23eb4bc48009d9a9a9a79fc663470e# cd /var/lib/docker/overlay2/
root@xxxx:/var/lib/docker/overlay2# du -sh *
533M    0030488f81e054d5ea1f1de746561bee735b02f09abdebb0b21a62b83c2a1692
31M     013b1d506dc051f86bc511ed5eedb0f68cc9eb9cf705b77fc839f517a5960bf1
160M    02fb438bab874dbb8216ee9f72f0153ea98d656ce9fbde9bb4c2ea06f2270ac2
36K     08cb44aa34810e2002a5265e7898df917fcce209a5120f3b3fdbbe5ce0308f89
20K     08ddbac452400693b63613c8e8e1349525778f1b2e098eca6856d7202331c081
285M    0d0d9ed3377319700c61e0e834adfa69dcc16e9653337a292ac8c981ca7ec626
48K     0d0d9ed3377319700c61e0e834adfa69dcc16e9653337a292ac8c981ca7ec626-init
136M    0d99a01b14d1c26e5585d0d53be279ba30bb3c92a3ceb5e31f913c8064a47f0a
5.2M    0f4e279fe7ba76d168a89a561ee4bcf481ab3ed2ce3c9fbb5db9f918e46e908b
2.3M    0fda6e4c3758dc7a3bb2adf65842965eb822b5a59afd352a8d5057c24ce3ce3f
40K     12e95f373d447f4cb8679ca2fc7b41bfcb2fffa8b9eeafb7bf42bb3299d45a97
84K     15312130320a7fe7049ec84b7f3e385068132de12c78d06d839a425da1570eb5
178M    160620f81fa496647257fe68125da7c1a7e11cbd850cf3d13b21da0a7a99bb4f
223M    16acb0dbda2b7bc8df8a2ef22e931721d1a3327efe7b3b8853deab1583bbf9db
40K     16acb0dbda2b7bc8df8a2ef22e931721d1a3327efe7b3b8853deab1583bbf9db-init
245M    16e7782e79e45eae87c02431a887fc8fcf3fbf089ef7dcb58abad5b1a5d851dc
24K     19ad0b9148f1b16e0abdc8a0ff990b969b2836f76a85c00f32be8d1bb707189c
1.4G    1aa6e0f1038b3056c9a128125d7a632caadf2755042a1b51ee795d63b3eaca3a
151M    1bf04c166c86f5642d01e41a7977f8adaac48afeaa79449a02fafb2d182d16ea
36K     20fe53de9d44b695791bc9723b2b12b2f0d0399b5ad94563648c8f3ed5475f24
404K    240867ba5fc1a9a8b2e32c0e4b4cc51929765a3708964d5cb5be04713c1a340b
179M    27883c071698d751f9f69b03368997b84c2f575e27623b4359fa8d02125fffef
94M     32e40c04ef90e3d102e07cfca2553899383836484ece8a312e54498a84532d88
277M    36cf040adc14a7ec82aa1293900699ca96c1ece2a18099dba9e5daedc8e7d981
40K     36cf040adc14a7ec82aa1293900699ca96c1ece2a18099dba9e5daedc8e7d981-init
7.5M    37459fb849621319fdcf1fe19bbae62b1fede3a6b2ba5ef3be7103d525eedb37
31M     38546b50b79563432a89bb9e3b93bad8bfb85c7d9eb4998179377db6166f5fee
24K     391702e2dd671b29dad857c3cf14ac539387a419f82cdb4a1764ca02cefe02c6
24K     3eb2e80326c80e01836cfa0f9ca9a05bad32895ca495e3e8af5959e6cea07940
36K     4081b6dc39350b630aa877ca0d5d54f07775ddec75a5ca987af74126b980314d
524M    447ea3bd59841c5e4a13bd68ed743cb332a0f6a44420abc07ffb114af6bc033d
36K     447ea3bd59841c5e4a13bd68ed743cb332a0f6a44420abc07ffb114af6bc033d-init
60K     45bff1f1faebdffd4d9fb24aa5ebfe3c0a657a6b9f8e104453ea5701fb5a37e3
36K     490db06a5523ad37c85404103fb2fceacd9317ae374dfc8bf7a43ad25ff1190b
32K     4a0b025e1180e206458ba44f6d1b13246b370524f7d1bbd52a852d9dc1b7ca3b
88M     4c98cb0c03250e45b194b15866b9baf0c16e46fc689e61e53943bbb54efb2261
6.0M    51a63236174547b0db061affe8de63b39f2afb6e83a0f0bd6cb3d2f214a776d5
76M     52097e341727c5e884b376aaef104d1cc9a78ac21dee8075acbd33437c379b6c
41M     5532c1ec937a0d8977170e0149f2bb317e23befadcd85e9b925b35a3c0a17551
384K    560c632bdba00607f7273ca5866ee2c4a13cf789317f5bcbf9d6bc089d4cb75d
56K     57b08155017f82c0ff37da6b5c509eab311681889758297379170d6b84f9de23
18M     5956ec3547af7ea2c81345aff0e3e0a4a2723a6c8827ae81f94479dcb457e917
32K     5bd559a8423847687d3bfe3dcb77199093377d6732c552ff7fc42c1ff6f200bf
44K     5ce865c699a88611cab36907f5130761e4a849d44cd932e8e9184dbad68462f0
55M     5ef31edff2e46c1c64626ec1824032387bf225885aa31c5eb34ddf5e4301eb7c
228K    5f14f3f75f1501bc919eb077b7666600890d7735ab123a3279b307f235549094
28K     603312e5efa97becd0b889fb4b57c0ce3c409ea3058fb4ef79fea8991ce88bc5
28K     6730ff7e21f46a07dbbbfa829dc0f65fb3436bddd798c6013b31b85f6dac6b62
78M     68ff0b2557287918b5b97d86009add372d08018116ffad020ccd1fd51741ebb1
20K     6f071a2f41c85b1ff3b546854c988573fad86f8645f3399e69d0aa309c3034ee
158M    716c874a84e4e73a0d8bc3445c3ee6d78327e5cfcfea6338376a37db242ba3b2
20K     75844097163ed4a93b53b914054621f5e88d362efebaa6709ecceaa812c4994d
104M    75937c40572f8414c726104b190ff72c16faed853484dde0d1af7c3d865908f5
114M    766b4a73a7ea0728392a696fb7af5c63b68c2e8e022dea0060e393d64d26e8e4
14M     778899b973b1484760b295e4ce1d9e4f3b4d66903b6628daae1ea56fb9fc5f43
285M    79c8df0d9a9d0648ab1b628431d3f26b8af948bf4ae846bca7bfb44b2da38312
28K     7a42b4352018ad73c4c070337d700be013d08353ed0697b1e7fa04d1ad6b2c3c
352M    7adbcfce761e7f2fded463e71d02610c5b871df3ab1a6593dc0516fd75fdc0d6
32K     7e9c105eaea66eccf6487855567eb15aa539cd08e14dffce5e319c784b014b75
7.6M    835c075acbfaebef2ccb0d265fa6228a357c36dc25e65ceb5cfa9fd9fbeeefe3
24K     8740e6225a1f356b6ee23497741739aba2467762a2f340406288e71581ad28e6
56K     8865c6ae542855b35902e71bb8147285715328afa2673f55376b826c44b024c0
523M    906d3184d24b978f4680ef74482510be06116d247802ce99d4766ff87447d0ee
40K     906d3184d24b978f4680ef74482510be06116d247802ce99d4766ff87447d0ee-init
24K     915951da5103d06a9b8c98f325a2c6abfdcde7d57b4a12671c14e33a1d6f3c74
24K     93d528dd2e45a8573cfb4889f9be757a9a7dd548cb91d3b86c3204b90ec62bfd
100M    940cfdc493659409fff007eb851c74e579487dc7b4d158392fdcff2069515a64
28K     9b1bc410cb54516fcbae1ba3eaa199a0c595041e76faeef024808f0ca849278f
46M     9c35ff8ada24f0137b4f9a3b946a1725ad1aa66fadf56e48afbc741129b2a50e
1.6M    a9623e4a26d12226afd124b67c4e8006fdf4b5a9c5ce3908def8c34f237e77a3
224K    a97d751f5a9db5e0a104faffd84ef3b471200eaac516876725dc5f33b0d35958
24K     aa054f46d0badb30fb8f588e3d447b7debf7a4ed75626a62638472b2d56a187f
20M     ab04469df8406ba3371df2c6ec4a14b49a0f26e9d796eb0404b52eea9cf65ea9
40K     b2cc6044cea5155b80d2803aff6c8beeb0fca92e71ad0e5846188f9fb723b4fd
11M     b3c0339786c8877d43ab10c6356bcc32fbf76c38129c708918dd9e0627372167
13M     b879cad56b1f59ead45cca4ca8005e3af95419431cfba68e50a55d0e157fdfc8
100K    bb3f6a69ad362762d0345fe8fa0de677eba437e163e5e385d68904898671287f
56K     bbd57dc93bb6e5013d945bf8eafe0a9d9472781d367f9ccd3591b9c6d7de1f17
128M    c1a69e24c0ba019c71f526b87e7c836d98aa27b33ad0f7880d882dbd29657389
496K    c60051197f9e0a84f220e2957ea2d585772bc10e2588fe768b09f12aded724ce
1.7M    c6bbb8765ccbbdc52b5540636d3badcb148647fb19b01d16fe649b2d56bf131b
610M    c9b693b56db2c52094fe8cdbd7d1633923f70903dd6d7f6ec81fca6e57a4f243
40K     c9b693b56db2c52094fe8cdbd7d1633923f70903dd6d7f6ec81fca6e57a4f243-init
23M     cae36f8b8d7eb490813fc050e2c4d8f5989ab2f31ffdb1fdf430c53f67b0b928
211M    d17adac73b20997081bd0ccc3d56f554f4240909bfb03953427a3e8b958bffd9
40K     d17adac73b20997081bd0ccc3d56f554f4240909bfb03953427a3e8b958bffd9-init
36K     d443c4e656eb9f3d4428ac0602069f948178c859abd031e653c76f8ca86ed8f3
5.0M    d59e2ae2c750fd8f471acc35245dbbd1c4405883c563253ffcd8f8a3abe82f56
88M     d610aab3cfbdb38a2ea82b65b69de0eb3083802f2955c2f6b89c61b5d94bcd42
6.0M    d729257fb5f04d88f57a78857cc722cee85c97c7f21ba98283a0fc9002af5f95
48K     dad36095f21af0615e32eef4757351d1b6df740238f1545a920c383f8b339730
120M    dc44bee9f6d30927966d3e0b4076772704d5f6b3179de1f4478257752f192354
40K     dc44bee9f6d30927966d3e0b4076772704d5f6b3179de1f4478257752f192354-init
24K     e62b62aa814f744561965943ab181f08c64463a9d79956ce44440980e641fc2b
1.2M    e8c558fbdd7560de3814d2d578eb4278cf64115992ed362de16d4c59779889ed
32K     e9e738aa278bb09fc633f2b374d8239d7864018ba8dee102d7e320753822d332
53M     eab50299daba8670d0ec418c451a481171a028aa0e25121fb13e2421e9c413cd
11G     eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b
40K     eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b-init
37M     ec39238400aec047e0153e5c479e5b03a3a8deea0fac980bb042b69efe1813a7
40K     ec39238400aec047e0153e5c479e5b03a3a8deea0fac980bb042b69efe1813a7-init
144M    ec898b8a1a546492e3b7e5f2a4f58d0b52f4a4ade2a61e194344a36a14a011c8
40K     ec898b8a1a546492e3b7e5f2a4f58d0b52f4a4ade2a61e194344a36a14a011c8-init
40M     f3828f534754a64e0873d8541a0c8da91010d1cac57df91931ac3189a29bcceb
172M    f5655a8fe76837c1dd28ac9cdf6021dea26694d69a1f85acdb1c115db658c330
26M     f704a94fae4a72aba287842bb72ceb54a4b8533c56612ade543c87c7c055a5b5
40M     f776c685e0df745c65ab6b02409934a2b35727dd7b4f623ca64890c470b65ded
4.2M    f9ea2fe7c0cb2de85b1a3ba216ff4bc930e0a0f0d59db3c361ff14472d6537cb
135M    fa1583426c88b6159fa5b6eff8912ca5c256ae80faed3903c18352c60a6c9f03
456K    l

有个11G的,进去看看是什么。

root@xxxx:/var/lib/docker/overlay2# cd eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b

root@xxxx:/var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b# du -sh *
4.0G    diff
4.0K    link
4.0K    lower
6.3G    merged
8.0K    work
root@xxxx:/var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b# cd merged

root@xxxx:/var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b/merged# du -sh *
1.6G    app
5.4M    bin
4.0K    boot
12K     dev
2.0M    etc
20K     home
9.7M    lib
4.0K    lib64
4.0K    media
4.0K    mnt
5.2M    opt
4.0K    proc
26M     root
8.0K    run
4.0M    sbin
4.0K    srv
4.0K    start-agenthub.sh
4.0K    sys
3.8G    tmp
972M    usr
33M     var

原来是tmp这种临时文件占了空间,进去看看。

root@xxxx:/var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b/merged# cd tmp
root@xxxx:/var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b/merged/tmp# du -sh *
8.0K    access-20230418.log
1.4M    access-20230424.log
1.5M    access-20230425.log
1.5M    access-20230426.log
1.5M    access-20230427.log
1.5M    access-20230428.log
1.5M    access-20230429.log
1.5M    access-20230430.log
1.5M    access-20230501.log
1.5M    access-20230502.log
1.5M    access-20230503.log
1.5M    access-20230504.log
2.1M    access-20230505.log
1.5M    access-20230506.log
1.5M    access-20230507.log
1.5M    access-20230508.log
1.5M    access-20230509.log
1.5M    access-20230510.log
1.5M    access-20230511.log
1.5M    access-20230512.log
1.5M    access-20230513.log
1.5M    access-20230514.log
1.5M    access-20230515.log
1.5M    access-20230516.log
1.5M    access-20230517.log
1.5M    access-20230518.log
1.5M    access-20230519.log
1.5M    access-20230520.log
1.5M    access-20230521.log
1.5M    access-20230522.log
1.5M    access-20230523.log
1.5M    access-20230524.log
1.5M    access-20230525.log
1.5M    access-20230526.log
1.5M    access-20230527.log
1.5M    access-20230528.log
1.5M    access-20230529.log
1.5M    access-20230530.log
1.5M    access-20230531.log
1.5M    access-20230601.log
1.5M    access-20230602.log
1.5M    access-20230603.log
1.5M    access-20230604.log
1.5M    access-20230605.log
1.5M    access-20230606.log
1.5M    access-20230607.log
1.5M    access-20230608.log
992K    access-20230609.log
1.5M    access-20230610.log
1.5M    access-20230611.log
1.5M    access-20230612.log
1.5M    access-20230613.log
1.5M    access-20230614.log
1.5M    access-20230615.log
1.5M    access-20230616.log
1.5M    access-20230617.log
1.5M    access-20230618.log
1.5M    access-20230619.log
1.5M    access-20230620.log
1.5M    access-20230621.log
1.5M    access-20230622.log
1.5M    access-20230623.log
1.5M    access-20230624.log
1.5M    access-20230625.log
1.5M    access-20230626.log
1.5M    access-20230627.log
1.5M    access-20230628.log
1.5M    access-20230629.log
1.5M    access-20230630.log
1.5M    access-20230701.log
1.5M    access-20230702.log
1.5M    access-20230703.log
1.5M    access-20230704.log
1.5M    access-20230705.log
1.5M    access-20230706.log
1.5M    access-20230707.log
1.5M    access-20230708.log
1.5M    access-20230709.log
1.5M    access-20230710.log
1.5M    access-20230711.log
1.5M    access-20230712.log
1.5M    access-20230713.log
1.5M    access-20230714.log
1.5M    access-20230715.log
1.5M    access-20230716.log
1.5M    access-20230717.log
1.5M    access-20230718.log
1.5M    access-20230719.log
1.5M    access-20230720.log
1.5M    access-20230721.log
1.5M    access-20230722.log
1.5M    access-20230723.log
1.5M    access-20230724.log
1.5M    access-20230725.log
1.5M    access-20230726.log
1.5M    access-20230727.log
2.9M    access-20230728.log
1.5M    access-20230729.log
1.5M    access-20230730.log
1.5M    access-20230731.log
1.5M    access-20230801.log
1.5M    access-20230802.log
1.5M    access-20230803.log
1.5M    access-20230804.log
1.5M    access-20230805.log
1.5M    access-20230806.log
1.5M    access-20230807.log
1.5M    access-20230808.log
1.5M    access-20230809.log
1.5M    access-20230810.log
1.5M    access-20230811.log
1.5M    access-20230812.log
1.5M    access-20230813.log
1.5M    access-20230814.log
1.5M    access-20230815.log
1.5M    access-20230816.log
1.5M    access-20230817.log
88K     access-20230818.log
1.5M    access-20230819.log
1.5M    access-20230820.log
1.5M    access-20230821.log
1.5M    access-20230822.log
1.5M    access-20230823.log
1.5M    access-20230824.log
1.5M    access-20230825.log
1.5M    access-20230826.log
1.5M    access-20230827.log
1.5M    access-20230828.log
1.5M    access-20230829.log
1.5M    access-20230830.log
1.5M    access-20230831.log
1.5M    access-20230901.log
1.5M    access-20230902.log
1.5M    access-20230903.log
1.5M    access-20230904.log
1.5M    access-20230905.log
1.5M    access-20230906.log
1.5M    access-20230907.log
1.5M    access-20230908.log
1.5M    access-20230909.log
1.5M    access-20230910.log
1.5M    access-20230911.log
1.5M    access-20230912.log
1.5M    access-20230913.log
1.5M    access-20230914.log
1.5M    access-20230915.log
1.5M    access-20230916.log
1.5M    access-20230917.log
1.5M    access-20230918.log
1.5M    access-20230919.log
1.5M    access-20230920.log
1.5M    access-20230921.log
1.5M    access-20230922.log
1.5M    access-20230923.log
1.5M    access-20230924.log
1.5M    access-20230925.log
1.5M    access-20230926.log
1.5M    access-20230927.log
1.5M    access-20230928.log
1.5M    access-20230929.log
1.5M    access-20230930.log
1.5M    access-20231001.log
1.5M    access-20231002.log
1.5M    access-20231003.log
1.5M    access-20231004.log
1.5M    access-20231005.log
1.5M    access-20231006.log
1.5M    access-20231007.log
1.5M    access-20231008.log
1.5M    access-20231009.log
1.5M    access-20231010.log
1.5M    access-20231011.log
1.5M    access-20231012.log
1.5M    access-20231013.log
1.5M    access-20231014.log
1.5M    access-20231015.log
1.5M    access-20231016.log
1.5M    access-20231017.log
1.5M    access-20231018.log
1.5M    access-20231019.log
1.5M    access-20231020.log
1.5M    access-20231021.log
1.5M    access-20231022.log
1.5M    access-20231023.log
1.5M    access-20231024.log
1.5M    access-20231025.log
1.5M    access-20231026.log
1.5M    access-20231027.log
1.5M    access-20231028.log
1.5M    access-20231029.log
1.5M    access-20231030.log
1.5M    access-20231031.log
1.5M    access-20231101.log
1.5M    access-20231102.log
1.5M    access-20231103.log
1.5M    access-20231104.log
1.5M    access-20231105.log
1.5M    access-20231106.log
1.5M    access-20231107.log
1.5M    access-20231108.log
1.5M    access-20231109.log
1.5M    access-20231110.log
1.5M    access-20231111.log
1.5M    access-20231112.log
1.5M    access-20231113.log
1.5M    access-20231114.log
1.5M    access-20231115.log
1.5M    access-20231116.log
1.5M    access-20231117.log
1.5M    access-20231118.log
1.5M    access-20231119.log
1.5M    access-20231120.log
1.5M    access-20231121.log
1.5M    access-20231122.log
1.5M    access-20231123.log
1.5M    access-20231124.log
1.5M    access-20231125.log
1.5M    access-20231126.log
1.5M    access-20231127.log
1.5M    access-20231128.log
1.5M    access-20231129.log
1.5M    access-20231130.log
1.5M    access-20231201.log
1.5M    access-20231202.log
1.5M    access-20231203.log
1.5M    access-20231204.log
1.5M    access-20231205.log
1.5M    access-20231206.log
1.5M    access-20231207.log
1.5M    access-20231208.log
1.5M    access-20231209.log
1.5M    access-20231210.log
1.5M    access-20231211.log
1.5M    access-20231212.log
1.5M    access-20231213.log
1.5M    access-20231214.log
1.5M    access-20231215.log
1.5M    access-20231216.log
1.5M    access-20231217.log
1.5M    access-20231218.log
1.5M    access-20231219.log
1.5M    access-20231220.log
1.5M    access-20231221.log
1.5M    access-20231222.log
1.5M    access-20231223.log
1.5M    access-20231224.log
1.5M    access-20231225.log
1.5M    access-20231226.log
1.5M    access-20231227.log
1.5M    access-20231228.log
1.5M    access-20231229.log
1.5M    access-20231230.log
1.5M    access-20231231.log
1.5M    access-20240101.log
1.5M    access-20240102.log
1.5M    access-20240103.log
1.5M    access-20240104.log
1.5M    access-20240105.log
1.5M    access-20240106.log
1.5M    access-20240107.log
1.5M    access-20240108.log
1.5M    access-20240109.log
1.5M    access-20240110.log
1.5M    access-20240111.log
1.5M    access-20240112.log
1.5M    access-20240113.log
1.5M    access-20240114.log
1.5M    access-20240115.log
1.5M    access-20240116.log
1.5M    access-20240117.log
1.5M    access-20240118.log
1.5M    access-20240119.log
1.5M    access-20240120.log
1.5M    access-20240121.log
1.5M    access-20240122.log
1.5M    access-20240123.log
1.5M    access-20240124.log
1.5M    access-20240125.log
492K    access-20240126.log
0       alinode-uds-path-1
0       alinode-uds-path-26
0       alinode-uds-path-27
0       alinode-uds-path-28
0       alinode-uds-path-35
0       alinode-uds-path-36
0       alinode-uds-path-37
0       alinode-uds-path-44
0       alinode-uds-path-45
0       alinode-uds-path-46
0       alinode-uds-path-49
0       alinode-uds-path-53
0       alinode-uds-path-54
0       alinode-uds-path-55
0       alinode-uds-path-58
4.0K    node-20230418.log
12M     node-20230424.log
13M     node-20230425.log
13M     node-20230426.log
13M     node-20230427.log
13M     node-20230428.log
13M     node-20230429.log
13M     node-20230430.log
13M     node-20230501.log
13M     node-20230502.log
13M     node-20230503.log
13M     node-20230504.log
13M     node-20230505.log
13M     node-20230506.log
13M     node-20230507.log
13M     node-20230508.log
13M     node-20230509.log
13M     node-20230510.log
13M     node-20230511.log
13M     node-20230512.log
13M     node-20230513.log
13M     node-20230514.log
13M     node-20230515.log
13M     node-20230516.log
13M     node-20230517.log
13M     node-20230518.log
13M     node-20230519.log
13M     node-20230520.log
13M     node-20230521.log
13M     node-20230522.log
13M     node-20230523.log
13M     node-20230524.log
13M     node-20230525.log
13M     node-20230526.log
13M     node-20230527.log
13M     node-20230528.log
13M     node-20230529.log
13M     node-20230530.log
13M     node-20230531.log
13M     node-20230601.log
13M     node-20230602.log
13M     node-20230603.log
13M     node-20230604.log
13M     node-20230605.log
13M     node-20230606.log
13M     node-20230607.log
13M     node-20230608.log
13M     node-20230609.log
13M     node-20230610.log
13M     node-20230611.log
13M     node-20230612.log
13M     node-20230613.log
13M     node-20230614.log
13M     node-20230615.log
13M     node-20230616.log
13M     node-20230617.log
13M     node-20230618.log
13M     node-20230619.log
13M     node-20230620.log
13M     node-20230621.log
13M     node-20230622.log
13M     node-20230623.log
13M     node-20230624.log
13M     node-20230625.log
13M     node-20230626.log
13M     node-20230627.log
13M     node-20230628.log
13M     node-20230629.log
13M     node-20230630.log
13M     node-20230701.log
13M     node-20230702.log
13M     node-20230703.log
13M     node-20230704.log
13M     node-20230705.log
13M     node-20230706.log
13M     node-20230707.log
13M     node-20230708.log
13M     node-20230709.log
13M     node-20230710.log
13M     node-20230711.log
13M     node-20230712.log
13M     node-20230713.log
13M     node-20230714.log
13M     node-20230715.log
13M     node-20230716.log
13M     node-20230717.log
13M     node-20230718.log
13M     node-20230719.log
13M     node-20230720.log
13M     node-20230721.log
13M     node-20230722.log
13M     node-20230723.log
13M     node-20230724.log
13M     node-20230725.log
13M     node-20230726.log
13M     node-20230727.log
13M     node-20230728.log
13M     node-20230729.log
13M     node-20230730.log
13M     node-20230731.log
13M     node-20230801.log
13M     node-20230802.log
13M     node-20230803.log
13M     node-20230804.log
13M     node-20230805.log
13M     node-20230806.log
13M     node-20230807.log
13M     node-20230808.log
13M     node-20230809.log
13M     node-20230810.log
13M     node-20230811.log
13M     node-20230812.log
13M     node-20230813.log
13M     node-20230814.log
13M     node-20230815.log
13M     node-20230816.log
13M     node-20230817.log
13M     node-20230818.log
13M     node-20230819.log
13M     node-20230820.log
13M     node-20230821.log
13M     node-20230822.log
13M     node-20230823.log
13M     node-20230824.log
13M     node-20230825.log
13M     node-20230826.log
13M     node-20230827.log
13M     node-20230828.log
13M     node-20230829.log
13M     node-20230830.log
13M     node-20230831.log
13M     node-20230901.log
13M     node-20230902.log
13M     node-20230903.log
13M     node-20230904.log
13M     node-20230905.log
13M     node-20230906.log
13M     node-20230907.log
13M     node-20230908.log
13M     node-20230909.log
13M     node-20230910.log
13M     node-20230911.log
13M     node-20230912.log
13M     node-20230913.log
13M     node-20230914.log
13M     node-20230915.log
13M     node-20230916.log
13M     node-20230917.log
13M     node-20230918.log
13M     node-20230919.log
13M     node-20230920.log
13M     node-20230921.log
13M     node-20230922.log
13M     node-20230923.log
13M     node-20230924.log
13M     node-20230925.log
13M     node-20230926.log
13M     node-20230927.log
13M     node-20230928.log
13M     node-20230929.log
13M     node-20230930.log
13M     node-20231001.log
13M     node-20231002.log
13M     node-20231003.log
13M     node-20231004.log
13M     node-20231005.log
13M     node-20231006.log
13M     node-20231007.log
13M     node-20231008.log
13M     node-20231009.log
13M     node-20231010.log
13M     node-20231011.log
13M     node-20231012.log
13M     node-20231013.log
13M     node-20231014.log
13M     node-20231015.log
13M     node-20231016.log
13M     node-20231017.log
13M     node-20231018.log
13M     node-20231019.log
13M     node-20231020.log
13M     node-20231021.log
13M     node-20231022.log
13M     node-20231023.log
13M     node-20231024.log
13M     node-20231025.log
13M     node-20231026.log
13M     node-20231027.log
13M     node-20231028.log
13M     node-20231029.log
13M     node-20231030.log
13M     node-20231031.log
13M     node-20231101.log
13M     node-20231102.log
13M     node-20231103.log
13M     node-20231104.log
13M     node-20231105.log
13M     node-20231106.log
13M     node-20231107.log
13M     node-20231108.log
13M     node-20231109.log
13M     node-20231110.log
13M     node-20231111.log
13M     node-20231112.log
13M     node-20231113.log
13M     node-20231114.log
13M     node-20231115.log
13M     node-20231116.log
13M     node-20231117.log
13M     node-20231118.log
13M     node-20231119.log
13M     node-20231120.log
13M     node-20231121.log
13M     node-20231122.log
13M     node-20231123.log
13M     node-20231124.log
13M     node-20231125.log
13M     node-20231126.log
13M     node-20231127.log
13M     node-20231128.log
13M     node-20231129.log
13M     node-20231130.log
13M     node-20231201.log
13M     node-20231202.log
13M     node-20231203.log
13M     node-20231204.log
13M     node-20231205.log
13M     node-20231206.log
13M     node-20231207.log
13M     node-20231208.log
13M     node-20231209.log
13M     node-20231210.log
13M     node-20231211.log
13M     node-20231212.log
13M     node-20231213.log
13M     node-20231214.log
13M     node-20231215.log
13M     node-20231216.log
13M     node-20231217.log
13M     node-20231218.log
13M     node-20231219.log
13M     node-20231220.log
13M     node-20231221.log
13M     node-20231222.log
13M     node-20231223.log
13M     node-20231224.log
13M     node-20231225.log
13M     node-20231226.log
13M     node-20231227.log
13M     node-20231228.log
13M     node-20231229.log
13M     node-20231230.log
13M     node-20231231.log
13M     node-20240101.log
13M     node-20240102.log
13M     node-20240103.log
13M     node-20240104.log
13M     node-20240105.log
13M     node-20240106.log
13M     node-20240107.log
13M     node-20240108.log
13M     node-20240109.log
13M     node-20240110.log
13M     node-20240111.log
13M     node-20240112.log
13M     node-20240113.log
13M     node-20240114.log
13M     node-20240115.log
13M     node-20240116.log
13M     node-20240117.log
13M     node-20240118.log
13M     node-20240119.log
13M     node-20240120.log
13M     node-20240121.log
13M     node-20240122.log
13M     node-20240123.log
13M     node-20240124.log
13M     node-20240125.log
4.0M    node-20240126.log

好了,这些日志我留着也不能当饭吃,毕竟我这不是什么生产力项目,果断决定干掉。不过还不能直接删除,得先停止那个容器,或是直接停止docker,我是直接停止docker,然后删除。

再看一下空间状况

root@xxxx:/var/lib/docker/overlay2# df -h
Filesystem      Size  Used Avail Use% Mounted on
tmpfs           794M  1.8M  793M   1% /run
/dev/vda1        58G   21G   34G  39% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/c9b693b56db2c52094fe8cdbd7d1633923f70903dd6d7f6ec81fca6e57a4f243/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/906d3184d24b978f4680ef74482510be06116d247802ce99d4766ff87447d0ee/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/36cf040adc14a7ec82aa1293900699ca96c1ece2a18099dba9e5daedc8e7d981/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/d17adac73b20997081bd0ccc3d56f554f4240909bfb03953427a3e8b958bffd9/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/16acb0dbda2b7bc8df8a2ef22e931721d1a3327efe7b3b8853deab1583bbf9db/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/0d0d9ed3377319700c61e0e834adfa69dcc16e9653337a292ac8c981ca7ec626/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/eb995abda2d2bb05662392ef409ce6c9851c1f89f6f44235a3b8abf9697ac23b/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/ec39238400aec047e0153e5c479e5b03a3a8deea0fac980bb042b69efe1813a7/merged
overlay          58G   21G   34G  39% /var/lib/docker/overlay2/dc44bee9f6d30927966d3e0b4076772704d5f6b3179de1f4478257752f192354/merged
tmpfs           794M     0  794M   0% /run/user/0

清了不少出来了。大家可以按以上的方法 ,继续找一下,一般都是一些日志文件,占了比较大的空间。

Responses