mirror of
https://github.com/containers/podman.git
synced 2025-08-06 11:32:07 +08:00
Add support for retry count with --restart flag
The on-failure restart option supports restarting only a given number of times. To do this, we need one additional field in the DB to track restart count (which conveniently fills a field in Inspect we weren't populating), plus some plumbing logic. Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -95,6 +95,7 @@ func (c *Container) getContainerInspectData(size bool, driverData *inspect.Data)
|
||||
LogPath: config.LogPath,
|
||||
ConmonPidFile: config.ConmonPidFile,
|
||||
Name: config.Name,
|
||||
RestartCount: int32(runtimeInfo.RestartCount),
|
||||
Driver: driverData.Name,
|
||||
MountLabel: config.MountLabel,
|
||||
ProcessLabel: config.ProcessLabel,
|
||||
|
Reference in New Issue
Block a user