BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 3 | running_containers=$(docker ps --filter name=dfc_ -q) |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 4 | |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 5 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 6 | if [ -z "$running_containers" ] |
| 7 | then |
| 8 | echo "No container requires termination" |
| 9 | else |
| 10 | echo "Stopping and removing containers" |
| 11 | docker stop $running_containers |
| 12 | docker rm $running_containers |
| 13 | fi |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 14 | |