Skip to content

flatten images - merge multiple layers into a single one #332

@unclejack

Description

@unclejack

There's no way to flatten images right now. When performing a build in multiple steps, a few images can be generated and a larger number of layers is produced. When these are pushed to the registry, a lot of data and a large number of layers have to be downloaded.

There are some cases where one starts with a base image (or another image), changes some large files in one step, changes them again in the next and deletes them in the end. This means those files would be stored in 2 separate layers and deleted by whiteout files in the final image.

These intermediary layers aren't necessarily useful to others or to the final deployment system.

Image flattening should work like this:

  • the history of the build steps needs to be preserved
  • the flattening can be done up to a target image (for example, up to a base image)
  • the flattening should also be allowed to be done completely (as if exporting the image)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/builderBuildkind/featureFunctionality or other elements that the project doesn't currently have. Features are new and shiny

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions