summaryrefslogtreecommitdiff
path: root/cmd/podman/run.go
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-03-15 10:06:49 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-03-20 16:20:12 +0000
commit38a1b2f16d210525eafcc845e7a9cce598207113 (patch)
tree5616a12d68ebe55138fbde85f936a6bc90d4c8fd /cmd/podman/run.go
parentecfa321288f10b70a59166f93296c77d262317fc (diff)
downloadpodman-38a1b2f16d210525eafcc845e7a9cce598207113.tar.gz
podman-38a1b2f16d210525eafcc845e7a9cce598207113.tar.bz2
podman-38a1b2f16d210525eafcc845e7a9cce598207113.zip
Image library stage 4 - create and commit
Migrate the podman create and commit subcommandis to leverage the images library. I also had to migrate the cmd/ portions of run and rmi. Signed-off-by: baude <bbaude@redhat.com> Closes: #498 Approved by: mheon
Diffstat (limited to 'cmd/podman/run.go')
-rw-r--r--cmd/podman/run.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmd/podman/run.go b/cmd/podman/run.go
index 7b840a387..f1e11f839 100644
--- a/cmd/podman/run.go
+++ b/cmd/podman/run.go
@@ -7,8 +7,10 @@ import (
"github.com/pkg/errors"
"github.com/projectatomic/libpod/libpod"
+ "github.com/projectatomic/libpod/libpod/image"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
+ "os"
)
var runDescription = "Runs a command in a new container from the given image"
@@ -49,12 +51,15 @@ func runCmd(c *cli.Context) error {
return errors.Errorf("image name or ID is required")
}
- imageName, _, data, err := imageData(c, runtime, c.Args()[0])
+ rtc := runtime.GetConfig()
+ newImage, err := runtime.ImageRuntime().New(c.Args()[0], rtc.SignaturePolicyPath, "", os.Stderr, nil, image.SigningOptions{})
+
+ data, err := libpod.GetImageData(newImage)
if err != nil {
return err
}
- createConfig, err := parseCreateOpts(c, runtime, imageName, data)
+ createConfig, err := parseCreateOpts(c, runtime, newImage.Names()[0], data)
if err != nil {
return err
}