mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Check containerd client before using on Windows
Throw an error if the containerd snapshotter is enabled on Windows but containerd has not been configured. This fixes a panic in this case when trying to use an uninitialized client. Signed-off-by: Derek McGowan <derek@mcg.dev> Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
committed by
Paweł Gronowski
parent
b1dccad684
commit
e4a1657762
@@ -1235,6 +1235,9 @@ func NewDaemon(ctx context.Context, config *config.Config, pluginStore *plugin.S
|
||||
}
|
||||
|
||||
if d.imageService == nil {
|
||||
if d.containerdClient == nil {
|
||||
return nil, errors.New("containerd snapshotter is enabled but containerd is not configured")
|
||||
}
|
||||
log.G(ctx).Info("Starting daemon with containerd snapshotter integration enabled")
|
||||
|
||||
resp, err := d.containerdClient.IntrospectionService().Plugins(ctx, `type=="io.containerd.snapshotter.v1"`)
|
||||
|
||||
Reference in New Issue
Block a user