mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
try to fix script to clean given docker images
This commit is contained in:
@@ -1,4 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
echo $imagesToBeDeleted
|
imagesToBeDeleted="alfresco-content-repository\|ags-repo-enterprise\|ags-share-enterprise\|alfresco-share"
|
||||||
|
echo "List all images:"
|
||||||
|
docker images -a
|
||||||
|
|
||||||
|
docker_images_list=$(docker images | grep '$imagesToBeDeleted' | awk '{print $3}' | uniq)
|
||||||
|
if [ "$docker_images_list" == "" ]; then
|
||||||
|
echo "No docker images on the agent"
|
||||||
|
else
|
||||||
|
echo "Clearing images: $docker_images_list"
|
||||||
|
docker rmi -f $docker_images_list
|
||||||
|
fi
|
||||||
|
Reference in New Issue
Block a user