Skip to content
Permalink
fb82f928c6
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 (12 sloc) 482 Bytes
foreach($line in Get-Content ./common.cmd) {
[Environment]::SetEnvironmentVariable($line.split('=')[0], $line.split('=')[1], "Process")
}
$fullimagename = $($env:maintainer) + '/' + $($env: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..."
}