Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Support #PATCH keyword #257

Open
yiranwang52 opened this issue Sep 6, 2019 · 0 comments
Open

Support #PATCH keyword #257

yiranwang52 opened this issue Sep 6, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@yiranwang52
Copy link
Contributor

yiranwang52 commented Sep 6, 2019

Is your feature request related to a problem? Please describe.
In a lot of cases, there will be a layer that's fairly big and is always different every time. However, only a minor part of the layer was actually changed (think NodeJS modules).

Describe the solution you'd like

  • Support #PATCH keyword. When committing such a layer, in addition to finding layer with expected hash, also add logic to find layer close enough to a given layer. There are a few ways this search feature can be implemented:
    • Use some form of hash tree.
    • Add a supplement index purely based on dockerfile content and some metadata (like git repo url)
    • Add a parameter, let called provide another image for cache analysis.
  • After a build is done, before pushing layers, if a similar enough layer already exists, just push a patch (using existing layer diff logic), and modify image manifest accordingly.

Additional context
This doesn't improve build time, but could significantly decrease image size and pull time (if upgrade is in-place). Build time improvement should be done by #PREFETCH keyword (see #263)

@yiranwang52 yiranwang52 added the enhancement New feature or request label Sep 6, 2019
@yiranwang52 yiranwang52 changed the title Support intelligent cache lookup, for layers that's similar enough instead of exactly the same Support #PATCH keyword Sep 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant