summaryrefslogtreecommitdiff
path: root/cmd/podman/common
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/podman/common')
-rw-r--r--cmd/podman/common/create.go6
-rw-r--r--cmd/podman/common/create_opts.go1
-rw-r--r--cmd/podman/common/specgen.go1
3 files changed, 8 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")
diff --git a/cmd/podman/common/create_opts.go b/cmd/podman/common/create_opts.go
index e14918fe1..040dc6570 100644
--- a/cmd/podman/common/create_opts.go
+++ b/cmd/podman/common/create_opts.go
@@ -122,6 +122,7 @@ type ContainerCLIOpts struct {
VolumesFrom []string
Workdir string
SeccompPolicy string
+ PidFile string
Net *entities.NetOptions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 363a8f5f9..310a07a00 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -644,6 +644,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
s.Timezone = c.Timezone
s.Umask = c.Umask
s.Secrets = c.Secrets
+ s.PidFile = c.PidFile
return nil
}