mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix undead containers
When a container has errors on removal, it gets flagged as dead. If you `docker rm -f` a dead container the container is dereffed from the daemon and doesn't show up on `docker ps` anymore... except that the container JSON file may still be lingering around and becomes undead when you restart the daemon. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
2f513db31d
commit
c3c08f76be
1 changed files with 1 additions and 0 deletions
|
@ -129,6 +129,7 @@ func (daemon *Daemon) commonRm(container *Container, forceRemove bool) (err erro
|
|||
if err != nil && forceRemove {
|
||||
daemon.idIndex.Delete(container.ID)
|
||||
daemon.containers.Delete(container.ID)
|
||||
os.RemoveAll(container.root)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
Loading…
Reference in a new issue