Tag:

从`docker diff`创build文件/文件夹大小的树形图

我正在尝试在Dockerfile中显示特定命令的文件大小的增加。 所以我跑docker diff和得到像(例如)的输出: C /var/lib/postgresql/9.3/main/pg_multixact/offsets C /var/lib/postgresql/9.3/main/pg_multixact/offsets/0000 C /var/lib/postgresql/9.3/main/pg_notify C /var/lib/postgresql/9.3/main/pg_notify/0000 C /var/lib/postgresql/9.3/main/pg_stat C /var/lib/postgresql/9.3/main/pg_stat/db_0.stat C /var/lib/postgresql/9.3/main/pg_stat/db_12035.stat C /var/lib/postgresql/9.3/main/pg_stat/db_16385.stat C /var/lib/postgresql/9.3/main/pg_stat/global.stat C /var/lib/postgresql/9.3/main/pg_stat_tmp C /var/lib/postgresql/9.3/main/pg_subtrans C /var/lib/postgresql/9.3/main/pg_subtrans/0000 C /var/lib/postgresql/9.3/main/pg_xlog D /var/lib/postgresql/9.3/main/pg_xlog/000000010000000000000001 A /var/lib/postgresql/9.3/main/pg_xlog/000000010000000000000002 A /var/lib/postgresql/9.3/main/pg_xlog/000000010000000000000003 C /var/lib/postgresql/9.3/main/postmaster.opts C /var/log C /var/log/postgresql C /var/log/postgresql/postgresql-9.3-main.log 我可以运行这个通过du -ak得到: 16 /var/lib/postgresql/9.3/main/base/16385/20462 16 /var/lib/postgresql/9.3/main/base/16385/20463 116 /var/lib/postgresql/9.3/main/base/16385/pg_internal.init 24 /var/lib/postgresql/9.3/main/global/11928 32 /var/lib/postgresql/9.3/main/global/11930 […]