-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libimage: refine pull-policy enforcement for custom platforms
When pulling down an image with a user-specified custom platform, we try to make sure that user gets what they are asking for. An inherent issue with multi-arch images is that there are many images in the wild which do not get the platform right (see containers/podman/issues/10682). That means we need to pessimistically assume that the local image is wrong and pull the "correct" one down from the registry; in the worst case that is redundant work but we have a guarantee of correctness. Motivated by containers/podman/issues/12707 I had another look at the code and found some space for optimizations. Previously, we enforced the pull policy to "always" but that may be too aggressive since we may be running in an airgapped environment and the local image is correct. With this change, we enforce the pull policy to "newer" which makes errors non-fatal in case a local image has been found; this seems like a good middleground between making sure we are serving the "correct" image and user friendliness. Signed-off-by: Valentin Rothberg <[email protected]>
- Loading branch information
Showing
3 changed files
with
56 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters