blue-build/cli

feat: Enable squashing of images

Closed this issue · 4 comments

I was doing some research into how the previous build system worked regarding layers being squashed. I found a particularly useful issue thread in the buildah repo that explained the default squashing strategy for the various tool. In short it goes:

  • buildah - default squash layers after base image
  • podman - default no squash
  • docker - default no squash

Since the original build system used buildah, the layers were being squashed. Since podman has been trying to follow the same implementation as docker, it followed the same pattern of not squashing.

Just doing some more searching, seems as though docker buildx does not support squashing (docker/buildx#727).

This makes things a little more complicated for use in GHA since docker is our default builder atm. This might end up requiring tradeoffs between making use of cache in GHA vs squashing. There will probably also have to be an option for creating a compatible Containerfile template for the podman/buildah versions for ubuntu-latest VMs in GHA.

This makes things a little more complicated for use in GHA since docker is our default builder atm. This might end up requiring tradeoffs between making use of cache in GHA vs squashing. There will probably also have to be an option for creating a compatible Containerfile template for the podman/buildah versions for ubuntu-latest VMs in GHA.

Maybe something that could be fixed with #143? Make some trade-off for the users by default (we should discuss that), then let them change it.

Yeah I was thinking of working on that issue first to start on this one. There's still the issue of GHA VMs not having the right versions of buildah and podman. Maybe this could also be a case where we can encourage users to run their builds using the CLI images we build (https://docs.github.com/en/actions/using-jobs/running-jobs-in-a-container). We are in a weird spot right now cause of Ubuntu LTS runners.

Merged in #155