Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confusing message when combining --watch --wait flags together #12565

Closed
gmile opened this issue Feb 21, 2025 · 2 comments · Fixed by #12566
Closed

Confusing message when combining --watch --wait flags together #12565

gmile opened this issue Feb 21, 2025 · 2 comments · Fixed by #12566

Comments

@gmile
Copy link

gmile commented Feb 21, 2025

The following command:

docker-compose --file docker-compose.yml up --watch --wait

Returns an error message:

--detach cannot be combined with --abort-on-container-exit, --abort-on-container-failure, --attach, --attach-dependencies or --watch

I am not sure why the error above appears or how to act on it since I am not using --detach flag.

The contents of docker-compose.yml I am using to reproduce the above issue looks like this:

services:
  whoami:
    image: traefik/whoami

The version of docker-compose is:

$ docker-compose version
Docker Compose version v2.33.0

FWIW, a docker-compose.yml originally used to spot the problem contains may other things, including build and develop fields for a service.

@ndeloof
Copy link
Contributor

ndeloof commented Feb 21, 2025

You get this message as --wait implies --detach. With many dependent flags there's a bunch of such combinations which are compatible and we hardly can provide an exact error message

@gmile
Copy link
Author

gmile commented Feb 21, 2025

@ndeloof thanks, your clarification is good enough for me 👍

@gmile gmile closed this as completed Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants