-
Notifications
You must be signed in to change notification settings - Fork 11
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
fix: docker builds don't squash the intermediary layers #118
Comments
This is probably something for the CLI? @gmpinder |
I'd think both. We could add a |
The only problem I foresee is that then the entire image would have to be redownloaded cause it would end up being all in one layer. Maybe we would have to go back to using the bash based |
What's the benefit of squashing anyway? Layers allow for diffs, right? |
Well for these uBlue OS builds in particular lots of things get copied into /tmp to be used by the RUN, when they are on different layers the "delete" doesn't do anything except make it look neater. |
So we actually solve this by using multi-stage builds where we keep the configs and modules in a separate stage and then mount it in for each module run. So yeah I'm starting to think that we might need to bring back the bash files module to take advantage of the ostree chunks. |
I personally don't view a 25-30% reduction (70-75% of original) in build time and a 50% (150% of original) increase in image size as a win... what is the goal of the change? What feature is it providing or bug is it fixing? Thanks. |
I'm curious on what causes the built images to become so large. That certainly wasn't a foreseen consequence of switching to docker for builds. It could be the squashing, or it could be something in Docker itself that's different? #112 might be related, maybe buildah uses compression by default and Docker doesn't? |
#118 (comment) as mentioned here reverting to the bash files module simplifies the build process (and allows for better usage of `ostree container commit`). It also means there are less overall layers and (ideally) a smaller image as a result. Tested locally and template generation seems to work just fine
BlueBuild no longer has custom layers. All layers are run with |
I use v1.3 of GitHub action, which includes v0.8.3 version of BlueBuild CLI at the moment. I get 400MB of needed custom layers when there is nothing of packages to update & around 1GB when I do some slight updates to RPMs (2 small Gnome extensions with only some minor file changes). I don't remember this behavior in legacy template, which used buildah. I don't know if this behavior is due to how docker handles things in CLI or due to how upstream base image is built, but I'm just noting this as another reported behavior. |
I try to create as few as possible anyway, but COPYs etc. creep up as the best way to handle things.
The custom layers are now showing:
custom layers needed: 24 (1.4 GB)
Compared to the previous builds with buildah:
custom layers needed: 2 (968 MB)
I do appreciate that they are a bit faster, but is there any way you can re-enable squashing? Thanks.
The text was updated successfully, but these errors were encountered: