mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-20 08:35:09 +00:00
Add filtering function to the dkcl function
The original dkcl function deletes all containers regardless of whether they were started by this sample or not (e.g. rancher/agent). Doing so would corrupt the host's environment and cause inconvenience. So I added conditional filtering to the dkfc function.
This commit is contained in:
parent
53ae435304
commit
dccd41ec13
1 changed files with 1 additions and 1 deletions
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function dkcl(){
|
function dkcl(){
|
||||||
CONTAINER_IDS=$(docker ps -aq)
|
CONTAINER_IDS=$(docker ps -a | grep "ca_peerOrg\|.example.com" | awk '{print $1}')
|
||||||
echo
|
echo
|
||||||
if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" = " " ]; then
|
if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" = " " ]; then
|
||||||
echo "========== No containers available for deletion =========="
|
echo "========== No containers available for deletion =========="
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue