-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat (CI): add script for cleaning docker data
- Loading branch information
1 parent
ea45731
commit a1f2d64
Showing
2 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@echo "Cleaning all related Docker data. This may take a moment..." | ||
|
||
@echo "Trying to stop running containers..." | ||
@FOR /f "tokens=*" %%i IN ('docker ps -a -q --filter "ancestor=boosting"') DO docker stop %%i | ||
|
||
@echo "Removing boosting image..." | ||
docker image rm boosting | ||
|
||
@echo "Removing boosting containers..." | ||
@FOR /f "tokens=*" %%i IN ('docker ps -a -q --filter "ancestor=boosting"') DO docker container rm %%i | ||
|
||
@echo "...done." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#! /bin/bash | ||
echo "Cleaning all related Docker data. This may take a moment..." | ||
echo "Trying to stop running containers..." | ||
docker stop "$(docker ps -a -q --filter "ancestor=boosting")" | ||
echo "Removing boosting image..." | ||
docker image rm boosting | ||
echo "Removing boosting containers..." | ||
docker container rm "$(docker ps -a -q --filter "ancestor=boosting")" | ||
echo "...done." |