I have a docker-compose.yml
file that spins up 11 containers:
Only after all 10 test containers have finished running all their tests, I'd like docker-compose
to spin down all 11 containers.
Does docker-compose up
support this sort of functionality or do I need to build my own on top of it?
If you have 11 containers (let's say they are called a_1
, a_2
, ... ,a_11
) and you need to wait for 10 of them (let's say the first 10) then
you can do the following using the command docker wait:
docker-compose up -d
docker wait a_1 a_2 ... a_10
docker-compose down