mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add podman run --timeout option
This option allows users to specify the maximum amount of time to run before conmon sends the kill signal to the container. Fixes: https://github.com/containers/podman/issues/6412 Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
@ -1024,6 +1024,10 @@ func (r *ConmonOCIRuntime) createOCIContainer(ctr *Container, restoreOptions *Co
|
||||
args = append(args, "-i")
|
||||
}
|
||||
|
||||
if ctr.config.Timeout > 0 {
|
||||
args = append(args, fmt.Sprintf("--timeout=%d", ctr.config.Timeout))
|
||||
}
|
||||
|
||||
if !r.enableKeyring {
|
||||
args = append(args, "--no-new-keyring")
|
||||
}
|
||||
|
Reference in New Issue
Block a user