1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #14854 from rhvgoyal/unmount-base

docker: Unmount -init layer root before taking a snapshot
This commit is contained in:
Vincent Batts 2015-07-23 15:17:07 -04:00
commit 1e40915e9d

View file

@ -81,12 +81,16 @@ func (daemon *Daemon) createRootfs(container *Container) error {
if err != nil {
return err
}
defer daemon.driver.Put(initID)
if err := setupInitLayer(initPath); err != nil {
daemon.driver.Put(initID)
return err
}
// We want to unmount init layer before we take snapshot of it
// for the actual container.
daemon.driver.Put(initID)
if err := daemon.driver.Create(container.ID, initID); err != nil {
return err
}