Created
April 23, 2018 16:52
-
-
Save skarlekar/ed6b192c8a8f91c288e0ed5d2a3b0072 to your computer and use it in GitHub Desktop.
Hyperledger Fabric - Remove old container after upgrading BNA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
first=`docker ps | grep "dev-peer0" | cut -c1-12 | head -n 1` | |
echo "Latest container: $first" | |
rest=`docker ps | grep "dev-peer0" | cut -c1-12 | grep -v $first` | |
echo "Stopped containers: " | |
docker stop $rest | |
echo "Removed containers: " | |
docker rm $rest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment