mirror of
https://github.com/containers/podman.git
synced 2025-12-01 02:27:13 +08:00
Vendor in latest containers(common, storage,image, buildah)
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
15
vendor/github.com/containers/buildah/pull.go
generated
vendored
15
vendor/github.com/containers/buildah/pull.go
generated
vendored
@@ -33,6 +33,8 @@ type PullOptions struct {
|
||||
// BlobDirectory is the name of a directory in which we'll attempt to
|
||||
// store copies of layer blobs that we pull down, if any. It should
|
||||
// already exist.
|
||||
//
|
||||
// Not applicable if DestinationLookupReferenceFunc is set.
|
||||
BlobDirectory string
|
||||
// AllTags is a boolean value that determines if all tagged images
|
||||
// will be downloaded from the repository. The default is false.
|
||||
@@ -50,6 +52,12 @@ type PullOptions struct {
|
||||
OciDecryptConfig *encconfig.DecryptConfig
|
||||
// PullPolicy takes the value PullIfMissing, PullAlways, PullIfNewer, or PullNever.
|
||||
PullPolicy define.PullPolicy
|
||||
// SourceLookupReference provides a function to look up source
|
||||
// references.
|
||||
SourceLookupReferenceFunc libimage.LookupReferenceFunc
|
||||
// DestinationLookupReference provides a function to look up destination
|
||||
// references. Overrides BlobDirectory, if set.
|
||||
DestinationLookupReferenceFunc libimage.LookupReferenceFunc
|
||||
}
|
||||
|
||||
// Pull copies the contents of the image from somewhere else to local storage. Returns the
|
||||
@@ -62,7 +70,12 @@ func Pull(ctx context.Context, imageName string, options PullOptions) (imageID s
|
||||
libimageOptions.OciDecryptConfig = options.OciDecryptConfig
|
||||
libimageOptions.AllTags = options.AllTags
|
||||
libimageOptions.RetryDelay = &options.RetryDelay
|
||||
libimageOptions.DestinationLookupReferenceFunc = cacheLookupReferenceFunc(options.BlobDirectory, types.PreserveOriginal)
|
||||
libimageOptions.SourceLookupReferenceFunc = options.SourceLookupReferenceFunc
|
||||
if options.DestinationLookupReferenceFunc != nil {
|
||||
libimageOptions.DestinationLookupReferenceFunc = options.DestinationLookupReferenceFunc
|
||||
} else {
|
||||
libimageOptions.DestinationLookupReferenceFunc = cacheLookupReferenceFunc(options.BlobDirectory, types.PreserveOriginal)
|
||||
}
|
||||
|
||||
if options.MaxRetries > 0 {
|
||||
retries := uint(options.MaxRetries)
|
||||
|
||||
Reference in New Issue
Block a user