mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-09-13 02:57:53 +00:00
Merge pull request #2121 from giuseppe/always-cleanup-rootless-containers
createconfig: always cleanup a rootless container
This commit is contained in:
commit
ac426bada2
1 changed files with 3 additions and 1 deletions
|
|
@ -518,7 +518,9 @@ func (c *CreateConfig) GetContainerCreateOptions(runtime *libpod.Runtime) ([]lib
|
|||
if c.CgroupParent != "" {
|
||||
options = append(options, libpod.WithCgroupParent(c.CgroupParent))
|
||||
}
|
||||
if c.Detach {
|
||||
// For a rootless container always cleanup the storage/network as they
|
||||
// run in a different namespace thus not reusable when we restart.
|
||||
if c.Detach || rootless.IsRootless() {
|
||||
options = append(options, libpod.WithExitCommand(c.createExitCommand()))
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue