Skip to content
Permalink
5.1.3_20250317…
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
@pcaskey
Latest commit 965ca28 Nov 11, 2022 History
1 contributor

Users who have contributed to this file

executable file 19 lines (14 sloc) 511 Bytes
#!/bin/bash
. ./common.bash
result=$(docker ps -a | grep ${imagename}_${tag})
if [ ! -z "$result" ]; then
echo "removing existing containers"
docker rm -f $(docker ps -a | grep ${imagename}_${tag} | awk '{print $1}')
fi
docker rmi -f ${imagename}_${tag}
result2=$(docker ps -a | grep ${imagename}_${tag}:arm64)
if [ ! -z "$result2" ]; then
echo "removing existing containers"
docker rm -f $(docker ps -a | grep ${imagename}_${tag}:arm64 | awk '{print $1}')
fi
docker rmi -f ${imagename}_${tag}:arm64