Skip to content
Permalink
ee38d710a8
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
16 lines (11 sloc) 391 Bytes
$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..."
}