Skip to content

FR: crane append can omit files if they already exist in the base #1328

Open

Description

@vdemeester asked about this

crane append currently just takes the provided tar file(s), and slaps it on top of the base image. This works fine, but it means if you repeatedly crane append the same (or only slightly different) tar onto the same base, it ends up with a bunch of duplicated layer data.

It could be cool if crane append and/or crane.Append or even-lower-level mutate.Append took an option to inspect the flattened base image and exclude any duplicate files (same path, same contents) in the new layer(s). If there are no new contents at all, crane append would be a no-op.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions