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

Including / as a path causes image to be 3X Bigger #197

Open
ProfessorManhattan opened this issue May 22, 2021 · 0 comments
Open

Including / as a path causes image to be 3X Bigger #197

ProfessorManhattan opened this issue May 22, 2021 · 0 comments
Labels

Comments

@ProfessorManhattan
Copy link

ProfessorManhattan commented May 22, 2021

Expected/Actual Behavior

When I include / as a path, I would expect the container to be the same size. Including / as a path causes a 272MB container to turn into a 943MB container. I tested this because I noticed that even only including a couple paths causes the image to grow significantly.


Steps to Reproduce the Problem

--http-probe=false --exec 'docker --version' --preserve-path-file 'paths.txt' and /

I'm opening this ticket mainly to get a better understanding of what docker-slim is doing to make the image bigger. I also would like to use the information to make my containers smaller. Anytime a container needs to have a lot of paths included, the container doesn't seem to get optimized a lot. This issue is especially the case when including stuff like /usr/lib/node_modules which might have a lot of files in it.

Will I have better luck using --include-bin-file or --include-path-file? I'm not really sure what the differences are between the different types of include/preserves. Or is it better to just use --exec and let DockerSlim do its thing instead of including paths?

@kcq kcq added the triage label May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants