nydus-snapshotter icon indicating copy to clipboard operation
nydus-snapshotter copied to clipboard

Wasted space in image

Open vflaux opened this issue 1 year ago • 1 comments

37MB is wasted here as the COPY layer is completely overlayed by the RUN chmod one: https://github.com/containerd/nydus-snapshotter/blob/1e7a12e61cae61f5b451aa1c0b8492805c17bfb5/misc/snapshotter/Dockerfile#L25-L26 Should use COPY --chmod instead from buildkit.

Dive output:

Analyzing image...
  efficiency: 74.4988 %
  wastedBytes: 73633235 bytes (74 MB)
  userWastedPercent: 53.6183 %
Inefficient Files:
Count  Wasted Space  File Path
    2         74 MB  /usr/local/bin/containerd-nydus-grpc
    2         30 kB  /lib/apk/db/installed
    2         22 kB  /lib/apk/db/scripts.tar
    2         152 B  /lib/apk/db/triggers
    2         131 B  /etc/apk/world

vflaux avatar Mar 07 '23 12:03 vflaux

Thanks for reporting. Could please help raise a PR to fix it?

changweige avatar Mar 08 '23 00:03 changweige