docker/cli ยท error

nothing found in stack: %s

Error message

nothing found in stack: %s

What it means

Error "nothing found in stack: %s" thrown in docker/cli.

Source

Thrown at cli/command/stack/ps.go:64

	flags.BoolVar(&opts.noResolve, "no-resolve", false, "Do not map IDs to Names")
	flags.VarP(&opts.filter, "filter", "f", "Filter output based on conditions provided")
	flags.BoolVarP(&opts.quiet, "quiet", "q", false, "Only display task IDs")
	flags.StringVar(&opts.format, "format", "", flagsHelper.FormatHelp)
	return cmd
}

// runPS is the swarm implementation of docker stack ps
func runPS(ctx context.Context, dockerCLI command.Cli, opts psOptions) error {
	apiClient := dockerCLI.Client()
	res, err := apiClient.TaskList(ctx, client.TaskListOptions{
		Filters: getStackFilterFromOpt(opts.namespace, opts.filter),
	})
	if err != nil {
		return err
	}

	if len(res.Items) == 0 {
		return fmt.Errorf("nothing found in stack: %s", opts.namespace)
	}

	if opts.format == "" {
		opts.format = task.DefaultFormat(dockerCLI.ConfigFile(), opts.quiet)
	}

	return task.Print(ctx, dockerCLI, res, idresolver.New(apiClient, opts.noResolve), !opts.noTrunc, opts.quiet, opts.format)
}

View on GitHub (pinned to e9452d6e78)

When it happens

Trigger: Thrown at cli/command/stack/ps.go:64 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of docker/cli@e9452d6e78 (2026-08-01). Data as JSON: /data/errors/d91f0a32b86a45a0.json. Report an issue: GitHub.