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
|
||||
one changing the network topology.
|
||||
|
||||
``tools/cleanup-images`` can be used to remove all Docker images from the
|
||||
local Docker cache. Note: this will remove the registry also.
|
||||
``tools/cleanup-images`` can be used to remove all Docker images built by
|
||||
Kolla from the local Docker cache.
|
||||
|
@ -4,11 +4,13 @@
|
||||
REAL_PATH=$(python -c "import os,sys;print os.path.realpath('$0')")
|
||||
cd "$(dirname "$REAL_PATH")/.."
|
||||
|
||||
. tools/validate-docker-execute.sh
|
||||
. tools/validate-docker-execute
|
||||
|
||||
IMAGES=`docker images -a -q`
|
||||
if [[ -z "$IMAGES" ]]; then
|
||||
KOLLA_IMAGES=$(docker images -a --filter "label=kolla_version" --format "{{.ID}}")
|
||||
|
||||
if [[ -z "$KOLLA_IMAGES" ]]; then
|
||||
echo "No images to cleanup, exit now."
|
||||
exit 0
|
||||
fi
|
||||
docker rmi $@ $IMAGES
|
||||
|
||||
docker rmi $@ $KOLLA_IMAGES
|
||||
|
Loading…
Reference in New Issue
Block a user