summaryrefslogtreecommitdiff
path: root/cmd/podman/stop.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-03-27 10:13:51 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-03-27 14:36:03 -0400
commit4352d585490f6c1eb7234ef4f92e0157083d69b3 (patch)
treee69b2d9487ea7623c2d04eaa848e67792e42faaa /cmd/podman/stop.go
parent2c5c1980200806d2a0dde375564b505b9150e645 (diff)
downloadpodman-4352d585490f6c1eb7234ef4f92e0157083d69b3.tar.gz
podman-4352d585490f6c1eb7234ef4f92e0157083d69b3.tar.bz2
podman-4352d585490f6c1eb7234ef4f92e0157083d69b3.zip
Add support for containers.conf
vendor in c/common config pkg for containers.conf Signed-off-by: Qi Wang qiwan@redhat.com Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'cmd/podman/stop.go')
-rw-r--r--cmd/podman/stop.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmd/podman/stop.go b/cmd/podman/stop.go
index c62da80df..383a1f61c 100644
--- a/cmd/podman/stop.go
+++ b/cmd/podman/stop.go
@@ -2,7 +2,6 @@ package main
import (
"github.com/containers/libpod/cmd/podman/cliconfig"
- "github.com/containers/libpod/libpod/define"
"github.com/containers/libpod/pkg/adapter"
"github.com/opentracing/opentracing-go"
"github.com/pkg/errors"
@@ -29,7 +28,7 @@ var (
},
Example: `podman stop ctrID
podman stop --latest
- podman stop --timeout 2 mywebserver 6e534f14da9d`,
+ podman stop --time 2 mywebserver 6e534f14da9d`,
}
)
@@ -42,8 +41,9 @@ func init() {
flags.BoolVarP(&stopCommand.Ignore, "ignore", "i", false, "Ignore errors when a specified container is missing")
flags.StringArrayVarP(&stopCommand.CIDFiles, "cidfile", "", nil, "Read the container ID from the file")
flags.BoolVarP(&stopCommand.Latest, "latest", "l", false, "Act on the latest container podman is aware of")
- flags.UintVar(&stopCommand.Timeout, "time", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
- flags.UintVarP(&stopCommand.Timeout, "timeout", "t", define.CtrRemoveTimeout, "Seconds to wait for stop before killing the container")
+ flags.UintVarP(&stopCommand.Timeout, "time", "t", defaultContainerConfig.Engine.StopTimeout, "Seconds to wait for stop before killing the container")
+ flags.UintVar(&stopCommand.Timeout, "timeout", defaultContainerConfig.Engine.StopTimeout, "Seconds to wait for stop before killing the container")
+ markFlagHidden(flags, "timeout")
markFlagHiddenForRemoteClient("latest", flags)
markFlagHiddenForRemoteClient("cidfile", flags)
markFlagHiddenForRemoteClient("ignore", flags)