From 6cd0c11ab11f016a8037e039a51eaf3a17207312 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Tue, 24 Jan 2023 13:08:18 +0100 Subject: [PATCH] rm: do not check for context builders when removing inactive This change has been introduced in e7b5ee7518703fb284fd9ece81abf71e4838f4d9 but we should not check context builders when removing inactive ones. Signed-off-by: CrazyMax --- commands/rm.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/commands/rm.go b/commands/rm.go index caaecc83..fcd4b5e9 100644 --- a/commands/rm.go +++ b/commands/rm.go @@ -141,9 +141,6 @@ func rmAllInactive(ctx context.Context, txn *store.Txn, dockerCli command.Cli, i if err != nil { return errors.Wrapf(err, "cannot load %s", b.Name) } - if cb := b.ContextName(); cb != "" { - return errors.Errorf("context builder cannot be removed, run `docker context rm %s` to remove this context", cb) - } if b.Dynamic { return nil }