Skip to content

Commit

Permalink
Create destroy.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
pcaskey authored Nov 20, 2018
1 parent 8eb1723 commit 8f19450
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions destroy.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
$maintainer = "tier"
$imagename = "shib-idp-windows"
$fullimagename = $($maintainer) + '/' + $($imagename)

$result = docker ps -a | grep $($fullimagename) | awk '{print $1}'

if ( $result ) {
docker rm -f $(docker ps -a | grep $($fullimagename) | awk '{print $1}')
docker rmi -f $($fullimagename)
echo "container/image removed..."
} else {
echo "no container/image found..."
}



0 comments on commit 8f19450

Please sign in to comment.