diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-02-13 18:42:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-13 18:42:00 +0100 |
commit | 62d88558e7637b72ea9ef53d1b3a2d08f2c6a51e (patch) | |
tree | 94834334f7b22ae6e914a3cfabe68c9bf5bde968 /cmd/podman/push.go | |
parent | df52dac1e70ea04dc3de8e7372e23c47f06291d6 (diff) | |
parent | 7dcc21f21311ee1ff3fe6974d5926bec7d181e5c (diff) | |
download | podman-62d88558e7637b72ea9ef53d1b3a2d08f2c6a51e.tar.gz podman-62d88558e7637b72ea9ef53d1b3a2d08f2c6a51e.tar.bz2 podman-62d88558e7637b72ea9ef53d1b3a2d08f2c6a51e.zip |
Merge pull request #2322 from baude/remotepush
podman-remote push
Diffstat (limited to 'cmd/podman/push.go')
-rw-r--r-- | cmd/podman/push.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/cmd/podman/push.go b/cmd/podman/push.go index 017e4fbd2..bbe8a4027 100644 --- a/cmd/podman/push.go +++ b/cmd/podman/push.go @@ -2,8 +2,6 @@ package main import ( "fmt" - "github.com/containers/libpod/cmd/podman/cliconfig" - "github.com/spf13/cobra" "io" "os" "strings" @@ -11,11 +9,13 @@ import ( "github.com/containers/image/directory" "github.com/containers/image/manifest" "github.com/containers/image/types" - "github.com/containers/libpod/cmd/podman/libpodruntime" + "github.com/containers/libpod/cmd/podman/cliconfig" + "github.com/containers/libpod/libpod/adapter" "github.com/containers/libpod/libpod/image" "github.com/containers/libpod/pkg/util" imgspecv1 "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" + "github.com/spf13/cobra" ) var ( @@ -93,7 +93,7 @@ func pushCmd(c *cliconfig.PushValues) error { registryCreds = creds } - runtime, err := libpodruntime.GetRuntime(&c.PodmanCommand) + runtime, err := adapter.GetRuntime(&c.PodmanCommand) if err != nil { return errors.Wrapf(err, "could not create runtime") } @@ -131,12 +131,7 @@ func pushCmd(c *cliconfig.PushValues) error { SignBy: signBy, } - newImage, err := runtime.ImageRuntime().NewFromLocal(srcName) - if err != nil { - return err - } - authfile := getAuthFile(c.Authfile) - return newImage.PushImageToHeuristicDestination(getContext(), destName, manifestType, authfile, c.SignaturePolicy, writer, c.Compress, so, &dockerRegistryOptions, nil) + return runtime.Push(getContext(), srcName, destName, manifestType, authfile, c.SignaturePolicy, writer, c.Compress, so, &dockerRegistryOptions, nil) } |