From e4a16577629aeeb08a2933825ec3ee5adef157f2 Mon Sep 17 00:00:00 2001 From: Derek McGowan Date: Thu, 4 Sep 2025 14:46:26 -0700 Subject: [PATCH] Check containerd client before using on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Paweł Gronowski --- daemon/daemon.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/daemon.go b/daemon/daemon.go index 2bb2d8c060..c72da06129 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -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"`)