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:
commit
1e40915e9d
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue