Skip to content

Make it easier for image layers to overlap #1304

Description

@jonathan-boudreau-work

Use case

On pull requests, we build images and push them to a registry. This is done to deploy to an environment temporarily. Unfortunately, the images are quite large, but bulk of the content doesn't change much.

We solved this issue by making the layers reproducible. If the blob is the same, then it will just be skipped when we upload the image, resulting in lower bandwidth / storage costs.

Currently this means having to use multi-stage builds to overwrite the file timestamps with touch -t all over the place. Its quite involved, and I think docker hub could benefit greatly from the reduced storage costs from something like this.

Proposal

Since this could be viewed as backward incompatible, a buildx build flag which automatically zeroes out the timestamps of files COPY'ed or ADD'ed into the image could be implemented to make it easier to have reproducible layer builds.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions