What is `docker compose up --wait` and `--abort-on-container-exit`?
AdvancedConceptDocker Compose
Answer
--wait implies -d and blocks until services are running/healthy, perfect for CI before running tests. --abort-on-container-exit stops everything when any container exits, with --exit-code-from test returning that service's exit code, a typical integration-test pattern.
docker compose up --abort-on-container-exit --exit-code-from tests
More on Docker Compose
What is Docker Compose and what problem does it solve?Beginner`docker-compose` vs `docker compose`?BeginnerShow a minimal Compose file with a web app and a database.BeginnerWhat does `depends_on` guarantee?IntermediateHow do containers in Compose reach each other?BeginnerHow does Compose choose the project name and why does it matter?Intermediate