-
Notifications
You must be signed in to change notification settings - Fork 336
Configurable Previous Image #897
Copy link
Copy link
Closed
Labels
good first issueA good first issue to get started with.A good first issue to get started with.size/mdMedium level of effortMedium level of effortstatus/readyIssue ready to be worked on.Issue ready to be worked on.type/enhancementIssue that requests a new feature or improvement.Issue that requests a new feature or improvement.
Milestone
Metadata
Metadata
Assignees
Labels
good first issueA good first issue to get started with.A good first issue to get started with.size/mdMedium level of effortMedium level of effortstatus/readyIssue ready to be worked on.Issue ready to be worked on.type/enhancementIssue that requests a new feature or improvement.Issue that requests a new feature or improvement.
Description
pack buildshould accept am optional--previous-imageflag that allows users to set the previous image to a particular tag reference, digest reference, or (when performing a daemon build) image ID.This is useful If I want to rebuild from a particular previous version of my app. Currently I would need to tag the previous image with the tag to which I want to export to force this behavior. This is an extra and potentially undesirable step.
Proposed solution
Usage:
pack build --previous-image <prev-image> <image>Lifecycle Arguments
When the builder is trusted,
packshould invokecreatorwith the-previous-imageflag orCNB_PREVIOUS_IMAGEenv var.When the builder is not truster,
packshould pass the previous image toanalyzerEdge Cases
When
pack buildis called with--publish,<prev-image>must be in the same image registry as<image>(exportercurrently does not support previous images in a different registry).Until we have a better solution for managing caches volumes this feature will only be useful for reusing
launch = true,cache = falselayers, because the previous cache is not necessarily provided.Additional context