Why does Docker desktop starts all my Compose stacks when I press play on just one?

Why does Docker desktop starts all my Compose stacks when I press play on just one and how to stop this behavior? It is difficult to replicate as it does not always do this.

Note I have “restart=no” in the docker compose file to prevent auto starts.

What is your Docker Desktop version on which operating system?

If it is a bug, you can report it on GitHub but Docker Desktop has 3 repositories for the three operating systems (Mac, Windows, Linux)

Someone would still need to reproduce the issue to be fixed. Can you share any more info that can help to reproduce it? Are the compose project names similar? For example starting with the same prefix. Or can one compose project be in a subfolder of another?

None of the above should cause the described behavior, so I just shared examples of possible bugs.

1 Like

Also I have Compose stack containers that just start out of the blue despite the restart: no in the configuration.

OS: MacOS 15.6.1
App version 4.54.0 (212467)

Reproduce: have some compose stacks (with restart: no) start stop them, keep docker desktop running and eventually the containers start up again.

I have reported the issue on Docker Github Docker Desktop Compose stack containers that just start out of the blue despite the restart: no in the configuration. · Issue #7819 · docker/for-mac · GitHub

I have added the name project name to the compose files, lets see if it that makes the difference.
Thanks for your comments.

If the issue was the project name it would happen every time with the same projects and wouldn’t be hard to reproduce. True, that using the same project can cause problems, but, but compose uses ithe project folder name as project name, so it can happen only when you have compose projects in multiple folders and you name them the same like

  • root
    • path1
      • project1
    • path2
      • project1

You would probably notice that the first time, not just when you want to start a stopped project or container. Docker Desktop uses the project name by the way to show the containers together, so you wouldn’t see multiple projects, just one, even when the actual containers are defined in separate compose files.

I also deleted the post you replied to. It looks like we missed that it was AI generated first when the spam filter blocked it.

That doesn’t seem to be enough. At least it is not predictable how long it should be done. And again, if the issue caused by the project name, containers would not wait to start.

I could not reproduce it, but thanks for reporting the issue on Github and sharing the link here! I subscribed and I am curious what this will turn out to be. If I manage to reproduce it I will share of course.

It happened again so that was not the solution. Although I did not delete the existing containers so I will do that and see if the makes a difference.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.