Merge pull request #9089 from cpuguy83/8942_create_volumes_on_create

Initialize volumes when container is created
This commit is contained in:
Jessie Frazelle
2014-12-03 15:42:09 -08:00
3 changed files with 29 additions and 0 deletions

View File

@@ -100,6 +100,13 @@ func (daemon *Daemon) Create(config *runconfig.Config, hostConfig *runconfig.Hos
return nil, nil, err
}
}
if err := container.Mount(); err != nil {
return nil, nil, err
}
defer container.Unmount()
if err := container.prepareVolumes(); err != nil {
return nil, nil, err
}
if err := container.ToDisk(); err != nil {
return nil, nil, err
}