diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/common/create.go | 10 | ||||
-rw-r--r-- | cmd/podman/common/create_opts.go | 2 | ||||
-rw-r--r-- | cmd/podman/containers/run.go | 6 |
3 files changed, 3 insertions, 15 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go index 0ec422313..60f4e526c 100644 --- a/cmd/podman/common/create.go +++ b/cmd/podman/common/create.go @@ -115,16 +115,6 @@ func GetCreateFlags(cf *ContainerCLIOpts) *pflag.FlagSet { "cpuset-mems", "", "Memory nodes (MEMs) in which to allow execution (0-3, 0,1). Only effective on NUMA systems.", ) - createFlags.BoolVarP( - &cf.Detach, - "detach", "d", false, - "Run container in background and print container ID", - ) - createFlags.StringVar( - &cf.DetachKeys, - "detach-keys", containerConfig.DetachKeys(), - "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-cf`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`", - ) createFlags.StringSliceVar( &cf.Devices, "device", containerConfig.Devices(), diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go index f4fecf4b7..5dea49c8b 100644 --- a/cmd/podman/common/create_opts.go +++ b/cmd/podman/common/create_opts.go @@ -32,8 +32,6 @@ type ContainerCLIOpts struct { CPUS float64 CPUSetCPUs string CPUSetMems string - Detach bool - DetachKeys string Devices []string DeviceCGroupRule []string DeviceReadBPs []string diff --git a/cmd/podman/containers/run.go b/cmd/podman/containers/run.go index f8c248b04..6b294d69a 100644 --- a/cmd/podman/containers/run.go +++ b/cmd/podman/containers/run.go @@ -63,6 +63,8 @@ func runFlags(flags *pflag.FlagSet) { flags.BoolVar(&runOpts.SigProxy, "sig-proxy", true, "Proxy received signals to the process") flags.BoolVar(&runRmi, "rmi", false, "Remove container image unless used by other containers") flags.UintVar(&runOpts.PreserveFDs, "preserve-fds", 0, "Pass a number of additional file descriptors into the container") + flags.BoolVarP(&runOpts.Detach, "detach", "d", false, "Run container in background and print container ID") + flags.StringVar(&runOpts.DetachKeys, "detach-keys", containerConfig.DetachKeys(), "Override the key sequence for detaching a container. Format is a single character `[a-Z]` or a comma separated sequence of `ctrl-<value>`, where `<value>` is one of: `a-cf`, `@`, `^`, `[`, `\\`, `]`, `^` or `_`") _ = flags.MarkHidden("signature-policy") if registry.IsRemote() { @@ -171,8 +173,6 @@ func run(cmd *cobra.Command, args []string) error { } } } - runOpts.Detach = cliVals.Detach - runOpts.DetachKeys = cliVals.DetachKeys cliVals.PreserveFDs = runOpts.PreserveFDs s := specgen.NewSpecGenerator(imageName, cliVals.RootFS) if err := common.FillOutSpecGen(s, &cliVals, args); err != nil { @@ -200,7 +200,7 @@ func run(cmd *cobra.Command, args []string) error { } } - if cliVals.Detach { + if runOpts.Detach { fmt.Println(report.Id) return nil } |