mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-03 20:21:44 +00:00
Merge pull request #14854 from rhvgoyal/unmount-base
docker: Unmount -init layer root before taking a snapshot
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user