I have a docker-compose.yml
file. After starting docker services using docker-compose -f {docker-compose.yml path} up -d
, I want to check if all the services defined in docker-compose.yml
are running.
I can get a count of all running services using docker ps | wc -l
. How can I get the count of all services defined in docker-compose.yml
?
If I have the count of all services defined in docker-compose.yml
, I can compare this number with the number of services running to check if all services are running.