Skip to content

Commit

Permalink
feat (CI): add script for cleaning docker data
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderSchultheiss committed Jun 7, 2024
1 parent ea45731 commit a1f2d64
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions clean.bat
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."
9 changes: 9 additions & 0 deletions clean.sh
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."

0 comments on commit a1f2d64

Please sign in to comment.