Browse Source

Edit DOCKER script

pull/157/head
Jae Kwon 9 years ago
parent
commit
313e25adf1
2 changed files with 16 additions and 12 deletions
  1. +14
    -10
      DOCKER/docker.sh
  2. +2
    -2
      DOCKER/run.sh

+ 14
- 10
DOCKER/docker.sh View File

@ -1,16 +1,20 @@
#! /bin/bash
# don't build if you're impatient
if [[ ! $NO_BUILD ]]; then
cd $GOPATH/src/github.com/tendermint/tendermint/DOCKER
docker build -t tmbase -f Dockerfile .
fi
# Build base Docker image
cd $GOPATH/src/github.com/tendermint/tendermint/DOCKER
docker build -t tmbase -f Dockerfile .
# create the data-only container
# Create the data-only container
# (config and blockchain data go in here)
docker run --name tmdata --entrypoint /bin/echo tmbase Data-only container for tmnode
# run tendermint
docker run name tmnode --volumes-from tmdata -d -p 46656:46656 -p 46657:46657 -e TMCOMMIT="origin/develop" tmbase
# Copy files into the data-only container
# You should stop the containers before running this
# cd $DATA_SRC
# tar cf - . | docker run -i --rm --volumes-from mintdata mint tar xvf - -C /data/tendermint
# cleanup
# docker rm -v -f tmdata tmnode; docker rmi -f tmbase
# Run tendermint node
docker run name tmnode --volumes-from tmdata -d -p 46656:46656 -p 46657:46657 -e TMREPO="github.com/tendermint/tendermint" -e TMHEAD="origin/develop" tmbase
# Cleanup
# docker rm -v -f tmdata tmnode; docker rmi -f tmbase

+ 2
- 2
DOCKER/run.sh View File

@ -1,7 +1,7 @@
#! /bin/bash
go get -u github.com/tendermint/tendermint/cmd/tendermint
cd $GOPATH/src/github.com/tendermint/tendermint
go get -u $TMREPO/cmd/tendermint
cd $GOPATH/src/$TMREPO
git fetch -a origin
git reset --hard $TMHEAD
make


Loading…
Cancel
Save