diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-04-19 16:22:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 16:22:05 -0400 |
commit | a94360a3f742cac07b006233371058d8b8c2caf3 (patch) | |
tree | 3dbbde6b5388f96f1552ca173bf49d0b49fa8e1a /libpod/options.go | |
parent | b5e0b292bf4ebf98a1ad45681da5f297d86de44b (diff) | |
parent | 4ffaa50d05bcb08d7db242232a128bb3493fcf25 (diff) | |
download | podman-a94360a3f742cac07b006233371058d8b8c2caf3.tar.gz podman-a94360a3f742cac07b006233371058d8b8c2caf3.tar.bz2 podman-a94360a3f742cac07b006233371058d8b8c2caf3.zip |
Merge pull request #10041 from chenk008/add_pidfile_flag
Add flag "--pidfile" for podman create/run
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 333a7c4a5..5cd0f7b88 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -1692,6 +1692,17 @@ func WithSecrets(secretNames []string) CtrCreateOption { } } +// WithPidFile adds pidFile to the container +func WithPidFile(pidFile string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + ctr.config.PidFile = pidFile + return nil + } +} + // Pod Creation Options // WithInfraImage sets the infra image for libpod. |