dockerdocker-composedocker-swarm

How to list a compose stack that is not part of a swarm?


enter image description here

I am trying docker stack ls but I get this error:

Error response from daemon: This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.

I can get it from docker ps and grep but I would prefer a simple command that lists all compose stacks.


Solution

  • The command you're looking for is docker compose ls.

    https://docs.docker.com/reference/cli/docker/compose/ls/