Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasted space in image #402

Open
vflaux opened this issue Mar 7, 2023 · 1 comment
Open

Wasted space in image #402

vflaux opened this issue Mar 7, 2023 · 1 comment

Comments

@vflaux
Copy link

vflaux commented Mar 7, 2023

37MB is wasted here as the COPY layer is completely overlayed by the RUN chmod one:

COPY containerd-nydus-grpc /usr/local/bin/
RUN chmod +x /usr/local/bin/containerd-nydus-grpc

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
@changweige
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants