mirror of https://github.com/docker/docs.git
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
|
@ -76,10 +76,9 @@ func (docker *Docker) Destroy(container *Container) error {
|
||||||
if err := container.Mountpoint.Umount(); err != nil {
|
if err := container.Mountpoint.Umount(); err != nil {
|
||||||
log.Printf("Unable to umount container %v: %v", container.Id, err)
|
log.Printf("Unable to umount container %v: %v", container.Id, err)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if err := container.Mountpoint.Deregister(); err != nil {
|
if err := container.Mountpoint.Deregister(); err != nil {
|
||||||
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
|
log.Printf("Unable to deregiser mountpoint %v: %v", container.Mountpoint.Root, err)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if err := os.RemoveAll(container.Root); err != nil {
|
if err := os.RemoveAll(container.Root); err != nil {
|
||||||
log.Printf("Unable to remove filesystem for %v: %v", container.Id, err)
|
log.Printf("Unable to remove filesystem for %v: %v", container.Id, err)
|
||||||
|
|
Loading…
Reference in New Issue