diff options
author | baude <bbaude@redhat.com> | 2018-03-22 10:17:50 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-03-23 15:35:37 +0000 |
commit | f7c8dd5836002f3bf85a7bbe6c949cdece5194df (patch) | |
tree | 6cee5a91ff32b016efcf8e9dbcff398b42ce5c4a /cmd/podman/push.go | |
parent | 8ca3bcc85d6bbf05e7838b20bfb1ae74afa8d35d (diff) | |
download | podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.gz podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.tar.bz2 podman-f7c8dd5836002f3bf85a7bbe6c949cdece5194df.zip |
Stage 4 Image cleanup
Cull funcs from runtime_img.go which are no longer needed. Also, fix any remaining
spots that use the old image technique.
Signed-off-by: baude <bbaude@redhat.com>
Closes: #532
Approved by: mheon
Diffstat (limited to 'cmd/podman/push.go')
-rw-r--r-- | cmd/podman/push.go | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go index e16b91611..3a39a1a0e 100644 --- a/cmd/podman/push.go +++ b/cmd/podman/push.go @@ -8,11 +8,10 @@ import ( "github.com/containers/image/manifest" "github.com/containers/image/types" - "github.com/containers/storage/pkg/archive" imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/projectatomic/libpod/libpod" - "github.com/projectatomic/libpod/libpod/common" + "github.com/projectatomic/libpod/libpod/image" "github.com/projectatomic/libpod/pkg/util" "github.com/urfave/cli" ) @@ -135,23 +134,22 @@ func pushCmd(c *cli.Context) error { } } - options := libpod.CopyOptions{ - Compression: archive.Uncompressed, - SignaturePolicyPath: c.String("signature-policy"), - DockerRegistryOptions: common.DockerRegistryOptions{ - DockerRegistryCreds: registryCreds, - DockerCertPath: certPath, - DockerInsecureSkipTLSVerify: skipVerify, - }, - SigningOptions: common.SigningOptions{ - RemoveSignatures: removeSignatures, - SignBy: signBy, - }, - AuthFile: c.String("authfile"), - Writer: writer, - ManifestMIMEType: manifestType, - ForceCompress: c.Bool("compress"), + dockerRegistryOptions := image.DockerRegistryOptions{ + DockerRegistryCreds: registryCreds, + DockerCertPath: certPath, + DockerInsecureSkipTLSVerify: skipVerify, + } + + so := image.SigningOptions{ + RemoveSignatures: removeSignatures, + SignBy: signBy, + } + + newImage, err := runtime.ImageRuntime().NewFromLocal(srcName) + if err != nil { + return err } - return runtime.PushImage(srcName, destName, options) + //return runtime.PushImage(srcName, destName, options) + return newImage.PushImage(destName, manifestType, c.String("authfile"), c.String("signature-policy"), writer, c.Bool("compress"), so, &dockerRegistryOptions) } |