summaryrefslogtreecommitdiff
path: root/cmd/podman/common/create.go
diff options
context:
space:
mode:
authorwuhua.ck <wuhua.ck@alibaba-inc.com>2021-04-15 22:36:50 +0800
committerchenkang <kongchen28@gmail.com>2021-04-16 13:43:14 +0800
commit8fbe06b8cbd8e3bc425d83130d562eb0c19f309b (patch)
treedb52b4259b92ad6fb30bbe3ff07d01eb7ce208ef /cmd/podman/common/create.go
parent373f15f617db6731c58776c1766a4cf2c74b22b9 (diff)
downloadpodman-8fbe06b8cbd8e3bc425d83130d562eb0c19f309b.tar.gz
podman-8fbe06b8cbd8e3bc425d83130d562eb0c19f309b.tar.bz2
podman-8fbe06b8cbd8e3bc425d83130d562eb0c19f309b.zip
add flag "--pidfile" for podman create/run
Signed-off-by: chenkang <kongchen28@gmail.com>
Diffstat (limited to 'cmd/podman/common/create.go')
-rw-r--r--cmd/podman/common/create.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/podman/common/create.go b/cmd/podman/common/create.go
index 220a30a10..e574f228e 100644
--- a/cmd/podman/common/create.go
+++ b/cmd/podman/common/create.go
@@ -817,6 +817,12 @@ func DefineCreateFlags(cmd *cobra.Command, cf *ContainerCLIOpts) {
)
_ = cmd.RegisterFlagCompletionFunc(cgroupConfFlagName, completion.AutocompleteNone)
+ pidFileFlagName := "pidfile"
+ createFlags.StringVar(
+ &cf.PidFile,
+ pidFileFlagName, "",
+ "Write the container process ID to the file")
+
_ = createFlags.MarkHidden("signature-policy")
if registry.IsRemote() {
_ = createFlags.MarkHidden("env-host")