#!/bin/bash
docker ps -a --format "{{.ID}}" | while read -r id; do
image=$(docker inspect --format "{{.Config.Image}}" "$id")
name=$(docker inspect --format "{{.Name}}" "$id")
if [[ $image == *sha256* ]]; then
docker rm -f "$name" &> /dev/null
echo -e "\033[31m $name ❌\033[0m"
else
echo -e "\033[32m $name ✔\033[0m"
fi
done