diff options
author | Miloslav Trmač <mitr@redhat.com> | 2018-07-28 03:13:54 +0200 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-01 18:22:58 +0000 |
commit | 891392339fc75b2da37672c2c9a42a90f74a335b (patch) | |
tree | d4ef25ffffc1a17e92fc7cba7b9657c647f76019 /libpod/image | |
parent | 1153486ab004ce1234305de295c753085c9b1356 (diff) | |
download | podman-891392339fc75b2da37672c2c9a42a90f74a335b.tar.gz podman-891392339fc75b2da37672c2c9a42a90f74a335b.tar.bz2 podman-891392339fc75b2da37672c2c9a42a90f74a335b.zip |
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
Diffstat (limited to 'libpod/image')
-rw-r--r-- | libpod/image/image.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libpod/image/image.go b/libpod/image/image.go index 3abaecc6c..068e57477 100644 --- a/libpod/image/image.go +++ b/libpod/image/image.go @@ -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) |