docker compose up --exit-code-from web

Category: Docker

docker compose up --exit-code-from web

Propagate a service's exit code

Returns the exit code of the web container when the stack stops, letting CI judge success or failure. Requires --abort-on-container-exit to make sense, since compose otherwise keeps running. Handy for compose-driven test harnesses.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.