List all Docker containers without a specific label List and find containers without a specific label TheLazyFox Nov 28, 2021 Script docker ps -aq | grep -v -E $(docker ps -aq --filter='label=deunhealth.restart.on.unhealthy' | paste -sd "|" -) | while read line ; do docker ps --filter "id=$line" --format "{{.Names}}"; doneAll containers without label "deunhealth.restart.on.unhealthy"docker ps -aq | grep -v -E $(docker ps -aq --filter='label=deunhealth.restart.on.unhealthy' | paste -sd "|" -) | while read line ; do name=$(docker ps --filter "id=$line" --format "{{.Names}}") && if [[ $name != "deunhealth" ]]; then echo "$name"; fi; doneAll containers without label "deunhealth.restart.on.unhealthy" except the one named "deunhealth" Tags: Script Looking for help? If you are looking for some help or want a quick chat, please head over to the Discord Community! TheLazyFox's Discord