echo "The tag in the last image heberged on the registry:"
var="docker images "localhost:5000/*" --format='{{.Tag}}' | head -1"
if [ "$var" == '2' ]
then
echo "its equal"
else
echo "its not equal"
eval "$var"
with ./script.sh i have my tag which is 2 but the function if doesn't work.