mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Move Daemon.registerMountPoints out of Daemon.setHostConfig
Call registerMountPoints after the rest of the container's configuration has been set up. This will make it possible to call an NRI plugin with the container's config, allowing it to adjust the mounts in that config, before it's used to find volumes etc. Signed-off-by: Rob Murray <rob.murray@docker.com>
This commit is contained in:
@@ -244,7 +244,7 @@ func (daemon *Daemon) create(ctx context.Context, daemonCfg *config.Config, opts
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if err := daemon.setHostConfig(ctr, opts.params.HostConfig, opts.params.DefaultReadOnlyNonRecursive); err != nil {
|
||||
if err := daemon.setHostConfig(ctr, opts.params.HostConfig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := daemon.registerLinks(ctr); err != nil {
|
||||
@@ -265,6 +265,9 @@ func (daemon *Daemon) create(ctx context.Context, daemonCfg *config.Config, opts
|
||||
}
|
||||
daemon.updateContainerNetworkSettings(ctr, endpointsConfigs)
|
||||
|
||||
if err := daemon.registerMountPoints(ctr, opts.params.DefaultReadOnlyNonRecursive); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := daemon.createContainerVolumesOS(ctx, ctr, opts.params.Config, opts.params.HostConfig); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user