summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/containers/create.go17
-rw-r--r--cmd/podman/containers/run.go8
2 files changed, 11 insertions, 14 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index 8f140e2b8..da550b606 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -75,8 +75,7 @@ func init() {
func create(cmd *cobra.Command, args []string) error {
var (
- err error
- rawImageInput string
+ err error
)
cliVals.Net, err = common.NetFlagsToNetOptions(cmd)
if err != nil {
@@ -92,20 +91,16 @@ func create(cmd *cobra.Command, args []string) error {
defer errorhandling.SyncQuiet(cidFile)
}
- if rfs := cliVals.RootFS; !rfs {
- rawImageInput = args[0]
- }
-
if err := createInit(cmd); err != nil {
return err
}
- if err := pullImage(args[0]); err != nil {
- return err
+ if !cliVals.RootFS {
+ if err := pullImage(args[0]); err != nil {
+ return err
+ }
}
-
- //TODO rootfs still
- s := specgen.NewSpecGenerator(rawImageInput)
+ s := specgen.NewSpecGenerator(args[0], cliVals.RootFS)
if err := common.FillOutSpecGen(s, &cliVals, args); err != nil {
return err
}
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 409b72198..e3fe4cd0b 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -104,8 +104,10 @@ func run(cmd *cobra.Command, args []string) error {
return err
}
- if err := pullImage(args[0]); err != nil {
- return err
+ if !cliVals.RootFS {
+ if err := pullImage(args[0]); err != nil {
+ return err
+ }
}
// If -i is not set, clear stdin
@@ -136,7 +138,7 @@ func run(cmd *cobra.Command, args []string) error {
}
runOpts.Detach = cliVals.Detach
runOpts.DetachKeys = cliVals.DetachKeys
- s := specgen.NewSpecGenerator(args[0])
+ s := specgen.NewSpecGenerator(args[0], cliVals.RootFS)
if err := common.FillOutSpecGen(s, &cliVals, args); err != nil {
return err
}