mirror of
https://github.com/containers/podman.git
synced 2025-05-20 16:47:39 +08:00
support pidfile on container restore
Signed-off-by: chenkang <kongchen28@gmail.com>
This commit is contained in:
@ -69,6 +69,13 @@ func (r *Runtime) RestoreContainer(ctx context.Context, rSpec *spec.Spec, config
|
||||
ctr.config.ConmonPidFile = ""
|
||||
}
|
||||
|
||||
// If the path to PidFile starts with the default value (RunRoot), then
|
||||
// the user has not specified '--pidfile' during run or create (probably).
|
||||
// In that case reset PidFile to be set to the default value later.
|
||||
if strings.HasPrefix(ctr.config.PidFile, r.storageConfig.RunRoot) {
|
||||
ctr.config.PidFile = ""
|
||||
}
|
||||
|
||||
return r.setupContainer(ctx, ctr)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user