35 lines
846 B
Bash
35 lines
846 B
Bash
|
|
#while running
|
|
#wait 10 seconds
|
|
#docker stop of containers that only run for containers that already stopped
|
|
#e.g. dobby and selenium
|
|
|
|
|
|
|
|
|
|
#first have to start all containers
|
|
sleep 20
|
|
|
|
#checks status of dobby container and saves into json file
|
|
docker inspect py_extract_dobby_test_vimes > outputInspect.json
|
|
#check if that container still running
|
|
outputRunning=$(jq '.[0].State.Running' outputInspect.json)
|
|
|
|
|
|
|
|
|
|
#sleep as long as dobby
|
|
while $outputRunning
|
|
do
|
|
echo $(date)
|
|
sleep 10
|
|
|
|
#checks status of dobby container and saves into json file
|
|
docker inspect py_extract_dobby_test_vimes > outputInspect.json
|
|
#check if that container still running
|
|
outputRunning=$(jq '.[0].State.Running' outputInspect.json)
|
|
|
|
done
|
|
|
|
#since dobby is done reading out data, we can stop the selenium container
|
|
docker stop "sel_browser_test_vimes" |