mirror of
https://github.com/containers/podman.git
synced 2025-06-27 21:50:18 +08:00
Split Image.PushImageToReference from Image.PushImage
This retains the existing string parsing heuristic for users who must continue to use it (notably the varlink API - or is it still subject to change?), but allows callers who can get precise references to supply them without having to deal with string formatting. Should not change behavior (but does not add unit tests). Signed-off-by: Miloslav Trmač <mitr@redhat.com> Closes: #1176 Approved by: rhatdan
This commit is contained in:

committed by
Atomic Bot

parent
1153486ab0
commit
891392339f
@ -533,7 +533,11 @@ func (i *Image) PushImage(ctx context.Context, destination, manifestMIMEType, au
|
||||
return err
|
||||
}
|
||||
}
|
||||
return i.PushImageToReference(ctx, dest, manifestMIMEType, authFile, signaturePolicyPath, writer, forceCompress, signingOptions, dockerRegistryOptions, forceSecure, additionalDockerArchiveTags)
|
||||
}
|
||||
|
||||
// PushImageToReference pushes the given image to a location described by the given path
|
||||
func (i *Image) PushImageToReference(ctx context.Context, dest types.ImageReference, manifestMIMEType, authFile, signaturePolicyPath string, writer io.Writer, forceCompress bool, signingOptions SigningOptions, dockerRegistryOptions *DockerRegistryOptions, forceSecure bool, additionalDockerArchiveTags []reference.NamedTagged) error {
|
||||
sc := GetSystemContext(signaturePolicyPath, authFile, forceCompress)
|
||||
|
||||
policyContext, err := getPolicyContext(sc)
|
||||
|
Reference in New Issue
Block a user