summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/create.go16
-rw-r--r--cmd/podman/images/import.go12
-rw-r--r--cmd/podman/machine/set.go2
-rw-r--r--cmd/podman/play/kube.go14
4 files changed, 33 insertions, 11 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 8d9a255ec..afaa1942e 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -394,14 +394,6 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
)
_ = cmd.RegisterFlagCompletionFunc(platformFlagName, completion.AutocompleteNone)
- podFlagName := "pod"
- createFlags.StringVar(
- &cf.Pod,
- podFlagName, "",
- "Run container in an existing pod",
- )
- _ = cmd.RegisterFlagCompletionFunc(podFlagName, AutocompletePods)
-
podIDFileFlagName := "pod-id-file"
createFlags.StringVar(
&cf.PodIDFile,
@@ -837,6 +829,14 @@ func DefineCreateFlags(cmd *cobra.Command, cf *entities.ContainerCreateOptions,
)
_ = cmd.RegisterFlagCompletionFunc(nameFlagName, completion.AutocompleteNone)
+ podFlagName := "pod"
+ createFlags.StringVar(
+ &cf.Pod,
+ podFlagName, "",
+ "Run container in an existing pod",
+ )
+ _ = cmd.RegisterFlagCompletionFunc(podFlagName, AutocompletePods)
+
cpuPeriodFlagName := "cpu-period"
createFlags.Uint64Var(
&cf.CPUPeriod,
diff --git a/cmd/podman/images/import.go b/cmd/podman/images/import.go
index a7416e298..47f2a798d 100644
--- a/cmd/podman/images/import.go
+++ b/cmd/podman/images/import.go
@@ -76,6 +76,18 @@ func importFlags(cmd *cobra.Command) {
flags.StringVarP(&importOpts.Message, messageFlagName, "m", "", "Set commit message for imported image")
_ = cmd.RegisterFlagCompletionFunc(messageFlagName, completion.AutocompleteNone)
+ osFlagName := "os"
+ flags.StringVar(&importOpts.OS, osFlagName, "", "Set the OS of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(osFlagName, completion.AutocompleteNone)
+
+ archFlagName := "arch"
+ flags.StringVar(&importOpts.Architecture, archFlagName, "", "Set the architecture of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(archFlagName, completion.AutocompleteNone)
+
+ variantFlagName := "variant"
+ flags.StringVar(&importOpts.Variant, variantFlagName, "", "Set the variant of the imported image")
+ _ = cmd.RegisterFlagCompletionFunc(variantFlagName, completion.AutocompleteNone)
+
flags.BoolVarP(&importOpts.Quiet, "quiet", "q", false, "Suppress output")
if !registry.IsRemote() {
flags.StringVar(&importOpts.SignaturePolicy, "signature-policy", "", "Path to a signature-policy file")
diff --git a/cmd/podman/machine/set.go b/cmd/podman/machine/set.go
index 4a05a9c1c..4c15f1de1 100644
--- a/cmd/podman/machine/set.go
+++ b/cmd/podman/machine/set.go
@@ -17,7 +17,7 @@ var (
Long: "Sets an updatable virtual machine setting",
RunE: setMachine,
Args: cobra.MaximumNArgs(1),
- Example: `podman machine set --root=false`,
+ Example: `podman machine set --rootful=false`,
ValidArgsFunction: completion.AutocompleteNone,
}
)
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 3067f0d54..e92516eb4 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -209,10 +209,15 @@ func teardown(yamlfile string) error {
podRmErrors utils.OutputErrors
)
options := new(entities.PlayKubeDownOptions)
- reports, err := registry.ContainerEngine().PlayKubeDown(registry.GetContext(), yamlfile, *options)
+ f, err := os.Open(yamlfile)
if err != nil {
return err
}
+ defer f.Close()
+ reports, err := registry.ContainerEngine().PlayKubeDown(registry.GetContext(), f, *options)
+ if err != nil {
+ return errors.Wrap(err, yamlfile)
+ }
// Output stopped pods
fmt.Println("Pods stopped:")
@@ -242,10 +247,15 @@ func teardown(yamlfile string) error {
}
func playkube(yamlfile string) error {
- report, err := registry.ContainerEngine().PlayKube(registry.GetContext(), yamlfile, kubeOptions.PlayKubeOptions)
+ f, err := os.Open(yamlfile)
if err != nil {
return err
}
+ defer f.Close()
+ report, err := registry.ContainerEngine().PlayKube(registry.GetContext(), f, kubeOptions.PlayKubeOptions)
+ if err != nil {
+ return errors.Wrap(err, yamlfile)
+ }
// Print volumes report
for i, volume := range report.Volumes {
if i == 0 {