mirror of
https://github.com/containers/podman.git
synced 2025-07-03 09:17:15 +08:00
Begin adding support for multiple OCI runtimes
Allow Podman containers to request to use a specific OCI runtime if multiple runtimes are configured. This is the first step to properly supporting containers in a multi-runtime environment. The biggest changes are that all OCI runtimes are now initialized when Podman creates its runtime, and containers now use the runtime requested in their configuration (instead of always the default runtime). Signed-off-by: Matthew Heon <matthew.heon@pm.me>
This commit is contained in:
@ -52,11 +52,11 @@ func (c *Container) Commit(ctx context.Context, destImage string, options Contai
|
||||
}
|
||||
|
||||
if c.state.State == ContainerStateRunning && options.Pause {
|
||||
if err := c.runtime.ociRuntime.pauseContainer(c); err != nil {
|
||||
if err := c.ociRuntime.pauseContainer(c); err != nil {
|
||||
return nil, errors.Wrapf(err, "error pausing container %q", c.ID())
|
||||
}
|
||||
defer func() {
|
||||
if err := c.runtime.ociRuntime.unpauseContainer(c); err != nil {
|
||||
if err := c.ociRuntime.unpauseContainer(c); err != nil {
|
||||
logrus.Errorf("error unpausing container %q: %v", c.ID(), err)
|
||||
}
|
||||
}()
|
||||
|
Reference in New Issue
Block a user