mirror of
https://github.com/docker/docs.git
synced 2026-04-12 06:19:22 +07:00
Merge pull request #9089 from cpuguy83/8942_create_volumes_on_create
Initialize volumes when container is created
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user