Deleting only images from kolla build
Co-Authored-By: Carlos Cesario <carloscesario@gmail.com> Change-Id: I3e9652e1cac156f822b388d2b9fd910180b4a892 Closes-Bug: #1551933
This commit is contained in:
parent
bde5e732d5
commit
9024564066
@ -32,5 +32,5 @@ triggered on the Docker host when the neutron-agents containers are launched.
|
|||||||
This can be useful when you want to do a new clean deployment, particularly
|
This can be useful when you want to do a new clean deployment, particularly
|
||||||
one changing the network topology.
|
one changing the network topology.
|
||||||
|
|
||||||
``tools/cleanup-images`` can be used to remove all Docker images from the
|
``tools/cleanup-images`` can be used to remove all Docker images built by
|
||||||
local Docker cache. Note: this will remove the registry also.
|
Kolla from the local Docker cache.
|
||||||
|
@ -4,11 +4,13 @@
|
|||||||
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
||||||
cd "$(dirname "$REAL_PATH")/.."
|
cd "$(dirname "$REAL_PATH")/.."
|
||||||
|
|
||||||
. tools/validate-docker-execute.sh
|
. tools/validate-docker-execute
|
||||||
|
|
||||||
IMAGES=`docker images -a -q`
|
KOLLA_IMAGES=$(docker images -a --filter "label=kolla_version" --format "{{.ID}}")
|
||||||
if [[ -z "$IMAGES" ]]; then
|
|
||||||
|
if [[ -z "$KOLLA_IMAGES" ]]; then
|
||||||
echo "No images to cleanup, exit now."
|
echo "No images to cleanup, exit now."
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
docker rmi $@ $IMAGES
|
|
||||||
|
docker rmi $@ $KOLLA_IMAGES
|
||||||
|
Loading…
Reference in New Issue
Block a user