diff --git a/DOCKER/Dockerfile b/DOCKER/Dockerfile index 1d92cfadf..c2031cf8e 100644 --- a/DOCKER/Dockerfile +++ b/DOCKER/Dockerfile @@ -37,5 +37,5 @@ USER tendermint ENV TMROOT $data_root # run tendermint -CMD ["./run.sh"] +CMD ["./DOCKER/run.sh"] diff --git a/DOCKER/README.md b/DOCKER/README.md index f1eb458ca..fcf2faaa1 100644 --- a/DOCKER/README.md +++ b/DOCKER/README.md @@ -8,14 +8,16 @@ mounting it. # To Play +The commands should work from tendermint/tendermint or tendermint/tendermint/DOCKER, +save the removal of DOCKER from the path. + Get quickly caught up with the testnet: `FAST_SYNC=true ./DOCKER/docker.sh` -Use a pre-existing `~/.tendermint`: `VC=~/.tendermint NO_BUILD=true ./docker.sh` +Use a pre-existing `~/.tendermint`: `VC=~/.tendermint NO_BUILD=true ./DOCKER/docker.sh` This is like doing `-v ~/.tendermint:/data/tendermint`, but better. -Use `NO_BUILD` to avoid waiting if the image is already built. If you don't use -`NO_BUILD`, you should be in `tendermint/tendermint`, and using `./DOCKER/docker.sh` +Use `NO_BUILD` to avoid waiting if the image is already built. Rerunning `docker.sh` will require you to delete the old containers: @@ -26,6 +28,6 @@ If you don't use the `VC` option, your key will be deleted too To avoid deleting and recreating the data container, use -`VD=true NO_BUILD=true ./docker.sh` +`VD=true NO_BUILD=true ./DOCKER/docker.sh` Of course, once running, you can just control the main container with `docker stop mint` and `docker start mint` diff --git a/DOCKER/docker.sh b/DOCKER/docker.sh index f362212cf..96d9fc23a 100755 --- a/DOCKER/docker.sh +++ b/DOCKER/docker.sh @@ -2,7 +2,11 @@ # don't build if you're impatient if [[ ! $NO_BUILD ]]; then - docker build -t mint . + if [ `basename $(pwd)` = DOCKER ]; then + docker build -t mint -f Dockerfile .. + else + docker build -t mint -f DOCKER/Dockerfile . + fi fi # create the data-only container