From e5dcb38ecd07343a54aa67f4068fc9a3fd055e5d Mon Sep 17 00:00:00 2001 From: satellitex Date: Fri, 10 Mar 2017 19:37:56 +0900 Subject: [PATCH] new build.sh option -f = overwrite hyperledger/iroha-docker images --- core/service/izanami.cpp | 2 +- docker/build.sh | 6 ++++++ docker/clear.sh | 4 ++++ docker/dev/scripts/build-iroha.sh | 2 +- 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 docker/clear.sh diff --git a/core/service/izanami.cpp b/core/service/izanami.cpp index 03b125312c..2d5fb1abcd 100644 --- a/core/service/izanami.cpp +++ b/core/service/izanami.cpp @@ -162,7 +162,7 @@ namespace izanami { //invoke when initialize Peer that to config Participation on the way void startIzanami() { - + logger::explore("izanami") << "startIzanami"; if( config::PeerServiceConfig::getInstance().isExistPublicKey( config::PeerServiceConfig::getInstance().getMyPublicKey() ) ) { logger::explore("izanami") << "I am start up Iroha Peer."; logger::explore("izanami") << "Closed Izanami"; diff --git a/docker/build.sh b/docker/build.sh index 7a6f226bb5..7fbd7adf78 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -18,6 +18,12 @@ if ! docker images hyperledger/iroha-dev | grep -q hyperledger/iroha-dev; then fi fi +# Overwrite docker image +if [ "$1" = "-f" ]; then + echo "yes read -f option overlap new iroha.tar" + ./clear.sh +fi + # run dev container to build iroha docker run -i \ -v ${IROHA_HOME}/docker/build:/build \ diff --git a/docker/clear.sh b/docker/clear.sh new file mode 100644 index 0000000000..9417a91625 --- /dev/null +++ b/docker/clear.sh @@ -0,0 +1,4 @@ +#!/bin/bash +docker rm `docker ps -a -q -f status=exited` +docker rmi -f hyperledger/iroha-docker +rm -f $IROHA_HOEM/docker/build/iroha.tar \ No newline at end of file diff --git a/docker/dev/scripts/build-iroha.sh b/docker/dev/scripts/build-iroha.sh index 1c11d150c5..1ff923bfe1 100755 --- a/docker/dev/scripts/build-iroha.sh +++ b/docker/dev/scripts/build-iroha.sh @@ -25,6 +25,6 @@ fi (mkdir -p $IROHA_BUILD && \ cd $IROHA_BUILD && \ cmake $IROHA_HOME -DCMAKE_BUILD_TYPE=$build_type && \ -make) || error "Can't build iroha" +make -j 14) || error "Can't build iroha" mkdir -p $IROHA_BUILD/config