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

Use --squash for images #3334

Closed
SimenB opened this issue Aug 16, 2017 · 6 comments
Closed

Use --squash for images #3334

SimenB opened this issue Aug 16, 2017 · 6 comments

Comments

@SimenB
Copy link
Contributor

SimenB commented Aug 16, 2017

Would it be possible to start using --squash when building the official images? I'd love to be able to drop all the && \ in the node docker files, and stop worrying so much about layers and just caring about cleaning up.

https://docs.docker.com/engine/reference/commandline/build/#squash-an-images-layers-squash-experimental-only

(semi-related, is there an issue I can track for when we can start to use multi-stage builds?)

@yosifkit
Copy link
Member

This would possibly double or more the storage requirements on our build servers and prevent users from being able to share layers between image updates and across versions thus increasing their storage needs as well. It will also make it even harder to clean up old images, since we would have to track the non-squashed version of each image along with its flat version.

You may be interested in the progress of moby/moby#34423 which will hopefully make multi-line RUN lines much easier to use.

No issue that I recall tracking multi-stage builds in official-images.

@emilevauge
Copy link
Contributor

Added #3383 to track multi-stage builds ;)

@cpuguy83
Copy link
Contributor

Also it looks like --squash may be removed since multi-stage build largely serves the same purpose.

@tianon
Copy link
Member

tianon commented Aug 30, 2017

Agreed, good call 👍

In either case, we'll definitely not be using squash here; will leave discussion of multi-stage to that new issue.

@tianon tianon closed this as completed Aug 30, 2017
@SimenB
Copy link
Contributor Author

SimenB commented Aug 30, 2017

Multi-stage is definitely better that squash. My thought was that one is available now, one is not 🙂
Highly in favor of multi-stage builds!

Also it looks like --squash may be removed since multi-stage build largely serves the same purpose.

Could you link to some issue tracking that (if it exists)?

@cpuguy83
Copy link
Contributor

moby/moby#34565

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

5 participants