Tools, FAQ, Tutorials:
Remove Older Versions Chaincode Containers
How to Remove Older Versions Chaincode Containers after the chaincode instance is upgraded?
✍: FYIcenter.com
After a chaincode instance is upgraded, chaincode containers of
the old version are still running on the Docker Engine.
You can follow this tutorial to remove them.
1. List all chaincode containers:
$ docker ps --all | grep chaincode dev-peer0.org2.example.com-mycc-2.0-03c5... dev-peer0.org2.example.com-mycc-2.0 dev-peer0.org1.example.com-mycc-2.0-04da... dev-peer0.org1.example.com-mycc-2.0 dev-peer0.org1.example.com-mycc-1.0-7782... dev-peer0.org1.example.com-mycc-1.0 dev-peer0.org2.example.com-mycc-1.0-6109... dev-peer0.org2.example.com-mycc-1.0
2. Stop version 1.0 chaincode containers:
$ docker stop dev-peer0.org1.example.com-mycc-1.0 $ docker stop dev-peer0.org2.example.com-mycc-1.0
3. Remove version 1.0 chaincode container images:
$ docker rm dev-peer0.org1.example.com-mycc-1.0 $ docker rm dev-peer0.org2.example.com-mycc-1.0
4. List all chaincode containers again:
$ docker ps -all | grep chaincode dev-peer0.org2.example.com-mycc-2.0-03c5... dev-peer0.org2.example.com-mycc-2.0 dev-peer0.org1.example.com-mycc-2.0-04da... dev-peer0.org1.example.com-mycc-2.0
5. Verify the chaincode instance:
$ docker exec -it cli bash bash-4.4# peer chaincode query -C mychannel -n mycc -c '{"Args":["query","a"]}' 80
Now only 2 containers are running for the version 2.0 of the chaincode instance. One for each participating peer.
⇒ "peer chaincode invoke" on BYFN
⇐ Upgrade Chaincode Instance on BYFN
2020-08-13, 1083🔥, 0💬
Popular Posts:
What is Azure API Management Developer Portal Admin? The Developer Portal Admin is an Azure Web port...
How to read RSS validation errors at w3.org? If your RSS feed has errors, the RSS validator at w3.or...
How to use "xml-to-json" Azure API Policy Statement? The "xml-to-json" Policy Statement allows you t...
Can Two Forms Be Nested? Can two forms be nested? The answer is no and yes: No. You can not nest two...
How to use the "rewrite-uri" Policy Statement for an Azure API service operation? The "rewrite-uri" ...