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.

45 lines
1.5 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. FROM alpine:3.6
  2. # This is the release of tendermint to pull in.
  3. ENV TM_VERSION 0.13.0
  4. ENV TM_SHA256SUM 36d773d4c2890addc61cc87a72c1e9c21c89516921b0defb0edfebde719b4b85
  5. # Tendermint will be looking for genesis file in /tendermint (unless you change
  6. # `genesis_file` in config.toml). You can put your config.toml and private
  7. # validator file into /tendermint.
  8. #
  9. # The /tendermint/data dir is used by tendermint to store state.
  10. ENV DATA_ROOT /tendermint
  11. ENV TMHOME $DATA_ROOT
  12. # Set user right away for determinism
  13. RUN addgroup tmuser && \
  14. adduser -S -G tmuser tmuser
  15. # Create directory for persistence and give our user ownership
  16. RUN mkdir -p $DATA_ROOT && \
  17. chown -R tmuser:tmuser $DATA_ROOT
  18. # jq and curl used for extracting `pub_key` from private validator while
  19. # deploying tendermint with Kubernetes. It is nice to have bash so the users
  20. # could execute bash commands.
  21. RUN apk add --no-cache bash curl jq
  22. RUN apk add --no-cache openssl && \
  23. wget https://s3-us-west-2.amazonaws.com/tendermint/binaries/tendermint/v${TM_VERSION}/tendermint_${TM_VERSION}_linux_amd64.zip && \
  24. echo "${TM_SHA256SUM} tendermint_${TM_VERSION}_linux_amd64.zip" | sha256sum -c && \
  25. unzip -d /bin tendermint_${TM_VERSION}_linux_amd64.zip && \
  26. apk del openssl && \
  27. rm -f tendermint_${TM_VERSION}_linux_amd64.zip
  28. # Expose the data directory as a volume since there's mutable state in there
  29. VOLUME $DATA_ROOT
  30. # p2p port
  31. EXPOSE 46656
  32. # rpc port
  33. EXPOSE 46657
  34. ENTRYPOINT ["tendermint"]
  35. CMD ["node", "--moniker=`hostname`"]