You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.4 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. FROM golang:1.7.4
  2. # This is the release of tendermint to pull in.
  3. ENV TM_VERSION 0.8.0
  4. # Tendermint will be looking for genesis file in /tendermint (unless you change
  5. # `genesis_file` in config.toml). You can put your config.toml and private
  6. # validator file into /tendermint.
  7. #
  8. # The /tendermint/data dir is used by tendermint to store state.
  9. ENV DATA_ROOT /tendermint
  10. ENV TMROOT $DATA_ROOT
  11. # Set user right away for determinism
  12. RUN groupadd -r tmuser && \
  13. useradd -r -s /bin/false -g tmuser tmuser
  14. # Create directory for persistence and give our user ownership
  15. RUN mkdir -p $DATA_ROOT && \
  16. chown -R tmuser:tmuser $DATA_ROOT
  17. # TODO replace with downloading a binary (this will allow us to replace golang
  18. # base container with alpine|jessie - 600MB vs 50MB)
  19. RUN apt-get update && \
  20. apt-get install -y --no-install-recommends \
  21. git && \
  22. rm -rf /var/lib/apt/lists/*
  23. RUN mkdir -p $GOPATH/src/github.com/tendermint/tendermint && \
  24. cd $GOPATH/src/github.com/tendermint/tendermint && \
  25. git clone https://github.com/tendermint/tendermint.git . && \
  26. git fetch && \
  27. git reset --hard v$TM_VERSION && \
  28. make install
  29. # Expose the data directory as a volume since there's mutable state in there
  30. VOLUME $DATA_ROOT
  31. EXPOSE 46656
  32. EXPOSE 46657
  33. ENTRYPOINT ["tendermint"]
  34. # By default you'll get the dummy app
  35. CMD ["node", "--moniker=`hostname`", "--proxy_app=dummy"]