File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ function askProceed () {
8787# Obtain CONTAINER_IDS and remove them
8888# TODO Might want to make this optional - could clear other containers
8989function clearContainers () {
90- CONTAINER_IDS=$( docker ps -aq )
90+ CONTAINER_IDS=$( docker ps -a | awk ' ($2 ~ /dev-peer.*.mycc.*/) {print $1} ' )
9191 if [ -z " $CONTAINER_IDS " -o " $CONTAINER_IDS " == " " ]; then
9292 echo " ---- No containers available for deletion ----"
9393 else
@@ -99,7 +99,7 @@ function clearContainers () {
9999# specifically the following images are often left behind:
100100# TODO list generated image naming patterns
101101function removeUnwantedImages() {
102- DOCKER_IMAGE_IDS=$( docker images | grep " dev\|none\|test-vp\| peer[0-9]- " | awk ' {print $3}' )
102+ DOCKER_IMAGE_IDS=$( docker images| awk ' ($1 ~ / dev- peer.*.mycc.*/) {print $3}' )
103103 if [ -z " $DOCKER_IMAGE_IDS " -o " $DOCKER_IMAGE_IDS " == " " ]; then
104104 echo " ---- No images available for deletion ----"
105105 else
You can’t perform that action at this time.
0 commit comments