-
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
feat: Squash builds #155
feat: Squash builds #155
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not really able to review Rust code quality, but it looks alright to me.
@gmpinder just wanted to check that I'm calling it correctly from a modified podman run \
-v buildah-vol:/var/run/containerd \
-v $PWD:/bluebuild \
--env-host \
--network=host \
--privileged \
--device /dev/fuse \
ghcr.io/blue-build/cli:latest-alpine \
build -vv --squash --push ./config/${{ inputs.recipe }} \
--registry ${{inputs.registry}} \
--registry-namespace ${{inputs.registry_namespace}} Thanks so much! |
That looks correct from what I can see. I'd also suggest trying the latest github action with cache enabled and move your recipe files into |
So some clarification @dperson , we don't quite have the cache abilities released yet but we're working on it. We are also adding the ability to squash in the GHA (blue-build/github-action#41), so you won't have to manage the action yourself soon. |
Buildah/Podman support
Buildah and podman can make heavy use of the squash feature. Something that I've noticed when trying to build from inside of a container, requiring intermediate layers with mounts causes build times to skyrocket. Build times are much faster when using the
--squash
functionality (seen as--layers=false
).Here are the following results from my personal build using both squash and non-squash functionality.
Squash upgrade:
All changes appear to show as a single custom layer. Any small change even at the end of the build appears to require completely downloading the new layer (squash only squashes additional layers on top of the base layer). This makes sense as layers cannot currently be downloaded by diff.
Non-squash upgrade:
As expected, there are more layers when not squashing and the size is slightly bigger. Most likely due to there being extra information stored in the layers that is subsequently removed.
Docker support
Docker is apparently no longer supporting the use of the
--squash
arg. The use of squash will not be available for the docker driver in this case.