add flag "--pidfile" for podman create/run

Signed-off-by: chenkang <kongchen28@gmail.com>
This commit is contained in:
wuhua.ck
2021-04-15 22:36:50 +08:00
committed by chenkang
parent 373f15f617
commit 8fbe06b8cb
12 changed files with 53 additions and 1 deletions

View File

@@ -375,6 +375,9 @@ func createContainerOptions(ctx context.Context, rt *libpod.Runtime, s *specgen.
}
options = append(options, libpod.WithDependencyCtrs(deps))
}
if s.PidFile != "" {
options = append(options, libpod.WithPidFile(s.PidFile))
}
return options, nil
}

View File

@@ -171,6 +171,10 @@ type ContainerBasicConfig struct {
// container. Dependencies can be specified by name or full/partial ID.
// Optional.
DependencyContainers []string `json:"dependencyContainers,omitempty"`
// PidFile is the file that saves container process id.
// set tags as `json:"-"` for not supported remote
// Optional.
PidFile string `json:"-"`
}
// ContainerStorageConfig contains information on the storage configuration of a