0

I want to write a python script (Python 2.7) to check the health of the Docker (using command 'docker ps').

docker ps

and it returns anything then it is healthy and exit the script. If the command is hung for more than 2 minutes then print "The Docker is stopped"

Kindly help me to figure out how to check whether it hung for 2 minutes.

Thanks in advance.

0 Answers0