Fix undeleted mountpoint on destroy
Issue #77, Now mountpoints are always deleted even when not currently mounted.
This commit is contained in:
parent
b97f9e8148
commit
fcc0af9f5b
1 changed files with 3 additions and 4 deletions
|
@ -76,10 +76,9 @@ func (docker *Docker) Destroy(container *Container) error {
|
|||
if err := container.Mountpoint.Umount(); err != nil {
|
||||
log.Printf("Unable to umount container %v: %v", container.Id, err)
|
||||
}
|
||||
|
||||
if err := container.Mountpoint.Deregister(); err != nil {
|
||||
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
|
||||
}
|
||||
}
|
||||
if err := container.Mountpoint.Deregister(); err != nil {
|
||||
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
|
||||
}
|
||||
if err := os.RemoveAll(container.Root); err != nil {
|
||||
log.Printf("Unable to remove filesystem for %v: %v", container.Id, err)
|
||||
|
|
Loading…
Add table
Reference in a new issue