docker/cli · warning

unknown help topic

Error message

unknown help topic: %v

What it means

Returned by the overridden `docker help <topic>` RunE (setupHelpCommand) when PluginRunCommand for the requested help topic returns an error that is not a NotFound error — meaning the help machinery recognized the topic string but could not produce help for it. %v is the joined help-topic args. It signals an unresolvable help topic rather than a missing plugin.

Solutions

  1. Run `docker --help` to list valid top-level topics.
  2. If the topic belongs to a plugin, ensure the plugin is installed and functional.
  3. Check the exact spelling/casing of the topic.

Example fix

// before
$ docker help bulid
unknown help topic: bulid

// after
$ docker help build
Defensive patterns

Strategy: validation

Validate before calling

// Validate a help topic against known commands/plugins before asking
func knownTopic(topic string) (bool, error) {
    out, err := exec.Command("docker", "--help").CombinedOutput()
    if err != nil { return false, err }
    return strings.Contains(string(out), topic), nil
}

Try / catch

// Fall back to root help if the specific topic is unknown
out, err := exec.CommandContext(ctx, "docker", "help", topic).CombinedOutput()
if err != nil && strings.Contains(string(out), "unknown help topic") {
    out, _ = exec.CommandContext(ctx, "docker", "--help").CombinedOutput()
}

Prevention

When it happens

Trigger: Running `docker help <topic>` where <topic> is neither a builtin command nor an installed plugin and the plugin lookup returned a non-NotFound error (e.g. plugin present but errored). Also reachable for topics that partially match but fail resolution.

Common situations: Asking for help on a command from a plugin that is broken; help topic typos that bypass the not-found path; mismatches between command stubs and installed plugins.

Related errors


AI-assisted analysis of docker/cli@4f84911bfe (2026-08-07). Data as JSON: /api/errors/eaff5d96eec554e5. Report an issue: GitHub.

Appendix: source

Thrown at cmd/docker/docker.go:221

			return err
		}
		return flagErrorFunc(cmd, err)
	})
}

func setupHelpCommand(dockerCli command.Cli, rootCmd, helpCmd *cobra.Command) {
	origRun := helpCmd.Run
	origRunE := helpCmd.RunE

	helpCmd.Run = nil
	helpCmd.RunE = func(c *cobra.Command, args []string) error {
		if len(args) > 0 {
			helpcmd, err := pluginmanager.PluginRunCommand(dockerCli, args[0], rootCmd)
			if err == nil {
				return helpcmd.Run()
			}
			if !errdefs.IsNotFound(err) {
				return fmt.Errorf("unknown help topic: %v", strings.Join(args, " "))
			}
		}
		if origRunE != nil {
			return origRunE(c, args)
		}
		origRun(c, args)
		return nil
	}
}

func tryRunPluginHelp(dockerCli command.Cli, ccmd *cobra.Command, cargs []string) error {
	root := ccmd.Root()

	cmd, _, err := root.Traverse(cargs)
	if err != nil {
		return err
	}
	helpcmd, err := pluginmanager.PluginRunCommand(dockerCli, cmd.Name(), root)

View on GitHub (pinned to 4f84911bfe)