summaryrefslogtreecommitdiff
path: root/cmd/podman
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman')
-rw-r--r--cmd/podman/containers/create.go3
-rw-r--r--cmd/podman/containers/rm.go3
-rw-r--r--cmd/podman/containers/run.go3
-rw-r--r--cmd/podman/containers/runlabel.go3
-rw-r--r--cmd/podman/images/build.go1
-rw-r--r--cmd/podman/images/list.go1
-rw-r--r--cmd/podman/images/load.go5
-rw-r--r--cmd/podman/images/pull.go2
-rw-r--r--cmd/podman/images/push.go2
-rw-r--r--cmd/podman/play/kube.go2
-rw-r--r--cmd/podman/system/service.go14
-rw-r--r--cmd/podman/system/varlink.go13
12 files changed, 32 insertions, 20 deletions
diff --git a/cmd/podman/containers/create.go b/cmd/podman/containers/create.go
index bb6cb5fdd..c8007bc2f 100644
--- a/cmd/podman/containers/create.go
+++ b/cmd/podman/containers/create.go
@@ -62,6 +62,9 @@ func createFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("env-host")
_ = flags.MarkHidden("http-proxy")
}
+ // Not sure we want these exposed yet. If we do, they need to be documented in man pages
+ _ = flags.MarkHidden("override-arch")
+ _ = flags.MarkHidden("override-os")
}
func init() {
diff --git a/cmd/podman/containers/rm.go b/cmd/podman/containers/rm.go
index f01462447..b25473a8d 100644
--- a/cmd/podman/containers/rm.go
+++ b/cmd/podman/containers/rm.go
@@ -74,8 +74,7 @@ func init() {
Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: rmCommand,
})
- flags := rmCommand.Flags()
- rmFlags(flags)
+ rmFlags(rmCommand.Flags())
registry.Commands = append(registry.Commands, registry.CliCommand{
Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go
index 2298691a9..890c6e827 100644
--- a/cmd/podman/containers/run.go
+++ b/cmd/podman/containers/run.go
@@ -63,6 +63,9 @@ func runFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("env-host")
_ = flags.MarkHidden("http-proxy")
}
+ // Not sure we want these exposed yet. If we do, they need to be documented in man pages
+ _ = flags.MarkHidden("override-arch")
+ _ = flags.MarkHidden("override-os")
}
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
diff --git a/cmd/podman/containers/runlabel.go b/cmd/podman/containers/runlabel.go
index 11fa362b8..8d1c48ad2 100644
--- a/cmd/podman/containers/runlabel.go
+++ b/cmd/podman/containers/runlabel.go
@@ -42,7 +42,7 @@ func init() {
Parent: containerCmd,
})
- flags := rmCommand.Flags()
+ flags := runlabelCommand.Flags()
flags.StringVar(&runlabelOptions.Authfile, "authfile", auth.GetDefaultAuthFile(), "Path of the authentication file. Use REGISTRY_AUTH_FILE environment variable to override")
flags.StringVar(&runlabelOptions.CertDir, "cert-dir", "", "`Pathname` of a directory containing TLS certificates and keys")
flags.StringVar(&runlabelOptions.Credentials, "creds", "", "`Credentials` (USERNAME:PASSWORD) to use for authenticating to a registry")
@@ -61,6 +61,7 @@ func init() {
_ = flags.MarkHidden("opt1")
_ = flags.MarkHidden("opt2")
_ = flags.MarkHidden("opt3")
+ _ = flags.MarkHidden("signature-policy")
if err := flags.MarkDeprecated("pull", "podman will pull if not found in local storage"); err != nil {
logrus.Error("unable to mark pull flag deprecated")
diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go
index 06a7efd25..2efc795cd 100644
--- a/cmd/podman/images/build.go
+++ b/cmd/podman/images/build.go
@@ -126,6 +126,7 @@ func buildFlags(flags *pflag.FlagSet) {
os.Exit(1)
}
flags.AddFlagSet(&fromAndBudFlags)
+ _ = flags.MarkHidden("signature-policy")
}
// build executes the build command.
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 022c90f71..4f8948b8b 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -74,7 +74,6 @@ func imageListFlagSet(flags *pflag.FlagSet) {
flags.BoolVar(&listFlag.digests, "digests", false, "Show digests")
flags.BoolVarP(&listFlag.noHeading, "noheading", "n", false, "Do not print column headings")
flags.BoolVar(&listFlag.noTrunc, "no-trunc", false, "Do not truncate output")
- flags.BoolVar(&listFlag.noTrunc, "notruncate", false, "Do not truncate output")
flags.BoolVarP(&listFlag.quiet, "quiet", "q", false, "Display only image IDs")
flags.StringVar(&listFlag.sort, "sort", "created", "Sort by "+sortFields.String())
flags.BoolVarP(&listFlag.history, "history", "", false, "Display the image name history")
diff --git a/cmd/podman/images/load.go b/cmd/podman/images/load.go
index 4bbffd432..a984ad81f 100644
--- a/cmd/podman/images/load.go
+++ b/cmd/podman/images/load.go
@@ -60,10 +60,7 @@ func loadFlags(flags *pflag.FlagSet) {
flags.StringVarP(&loadOpts.Input, "input", "i", "", "Read from specified archive file (default: stdin)")
flags.BoolVarP(&loadOpts.Quiet, "quiet", "q", false, "Suppress the output")
flags.StringVar(&loadOpts.SignaturePolicy, "signature-policy", "", "Pathname of signature policy file")
- if registry.IsRemote() {
- _ = flags.MarkHidden("signature-policy")
- }
-
+ _ = flags.MarkHidden("signature-policy")
}
func load(cmd *cobra.Command, args []string) error {
diff --git a/cmd/podman/images/pull.go b/cmd/podman/images/pull.go
index 9e883703f..7bb4f6d37 100644
--- a/cmd/podman/images/pull.go
+++ b/cmd/podman/images/pull.go
@@ -87,9 +87,9 @@ func pullFlags(flags *pflag.FlagSet) {
if registry.IsRemote() {
_ = flags.MarkHidden("authfile")
_ = flags.MarkHidden("cert-dir")
- _ = flags.MarkHidden("signature-policy")
_ = flags.MarkHidden("tls-verify")
}
+ _ = flags.MarkHidden("signature-policy")
}
// imagePull is implement the command for pulling images.
diff --git a/cmd/podman/images/push.go b/cmd/podman/images/push.go
index dd536213f..35a6254de 100644
--- a/cmd/podman/images/push.go
+++ b/cmd/podman/images/push.go
@@ -87,9 +87,9 @@ func pushFlags(flags *pflag.FlagSet) {
_ = flags.MarkHidden("cert-dir")
_ = flags.MarkHidden("compress")
_ = flags.MarkHidden("quiet")
- _ = flags.MarkHidden("signature-policy")
_ = flags.MarkHidden("tls-verify")
}
+ _ = flags.MarkHidden("signature-policy")
}
// imagePush is implement the command for pushing images.
diff --git a/cmd/podman/play/kube.go b/cmd/podman/play/kube.go
index 2499b54b9..5703cd314 100644
--- a/cmd/podman/play/kube.go
+++ b/cmd/podman/play/kube.go
@@ -59,6 +59,8 @@ func init() {
flags.StringVar(&kubeOptions.SignaturePolicy, "signature-policy", "", "`Pathname` of signature policy file (not usually used)")
flags.StringVar(&kubeOptions.SeccompProfileRoot, "seccomp-profile-root", defaultSeccompRoot, "Directory path for seccomp profiles")
}
+
+ _ = flags.MarkHidden("signature-policy")
}
func kube(cmd *cobra.Command, args []string) error {
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index b5dd2f2aa..221738f33 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -26,13 +26,12 @@ Enable a listening service for API access to Podman commands.
`
srvCmd = &cobra.Command{
- Use: "service [flags] [URI]",
- Args: cobra.MaximumNArgs(1),
- Short: "Run API service",
- Long: srvDescription,
- RunE: service,
- Example: `podman system service --time=0 unix:///tmp/podman.sock
- podman system service --varlink --time=0 unix:///tmp/podman.sock`,
+ Use: "service [flags] [URI]",
+ Args: cobra.MaximumNArgs(1),
+ Short: "Run API service",
+ Long: srvDescription,
+ RunE: service,
+ Example: `podman system service --time=0 unix:///tmp/podman.sock`,
}
srvArgs = struct {
@@ -50,7 +49,6 @@ func init() {
flags := srvCmd.Flags()
flags.Int64VarP(&srvArgs.Timeout, "time", "t", 5, "Time until the service session expires in seconds. Use 0 to disable the timeout")
- flags.Int64Var(&srvArgs.Timeout, "timeout", 5, "Time until the service session expires in seconds. Use 0 to disable the timeout")
flags.BoolVar(&srvArgs.Varlink, "varlink", false, "Use legacy varlink service instead of REST")
_ = flags.MarkDeprecated("varlink", "valink API is deprecated.")
diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go
index c83f5ff76..de855eba6 100644
--- a/cmd/podman/system/varlink.go
+++ b/cmd/podman/system/varlink.go
@@ -1,3 +1,5 @@
+// +build linux
+
package system
import (
@@ -6,6 +8,7 @@ import (
"github.com/containers/libpod/cmd/podman/registry"
"github.com/containers/libpod/pkg/domain/entities"
"github.com/spf13/cobra"
+ "github.com/spf13/pflag"
)
var (
@@ -20,7 +23,7 @@ var (
Long: varlinkDescription,
RunE: varlinkE,
Example: `podman varlink unix:/run/podman/io.podman
- podman varlink --timeout 5000 unix:/run/podman/io.podman`,
+ podman varlink --time 5000 unix:/run/podman/io.podman`,
}
varlinkArgs = struct {
Timeout int64
@@ -34,8 +37,14 @@ func init() {
})
flags := varlinkCmd.Flags()
flags.Int64VarP(&varlinkArgs.Timeout, "time", "t", 1000, "Time until the varlink session expires in milliseconds. Use 0 to disable the timeout")
- flags.Int64Var(&varlinkArgs.Timeout, "timeout", 1000, "Time until the varlink session expires in milliseconds. Use 0 to disable the timeout")
+ flags.SetNormalizeFunc(aliasTimeoutFlag)
+}
+func aliasTimeoutFlag(_ *pflag.FlagSet, name string) pflag.NormalizedName {
+ if name == "timeout" {
+ name = "time"
+ }
+ return pflag.NormalizedName(name)
}
func varlinkE(cmd *cobra.Command, args []string) error {