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 () {
87
87
# Obtain CONTAINER_IDS and remove them
88
88
# TODO Might want to make this optional - could clear other containers
89
89
function clearContainers () {
90
- CONTAINER_IDS=$( docker ps -aq )
90
+ CONTAINER_IDS=$( docker ps -a | awk ' ($2 ~ /dev-peer.*.mycc.*/) {print $1} ' )
91
91
if [ -z " $CONTAINER_IDS " -o " $CONTAINER_IDS " == " " ]; then
92
92
echo " ---- No containers available for deletion ----"
93
93
else
@@ -99,7 +99,7 @@ function clearContainers () {
99
99
# specifically the following images are often left behind:
100
100
# TODO list generated image naming patterns
101
101
function 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}' )
103
103
if [ -z " $DOCKER_IMAGE_IDS " -o " $DOCKER_IMAGE_IDS " == " " ]; then
104
104
echo " ---- No images available for deletion ----"
105
105
else
You can’t perform that action at this time.
0 commit comments