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.7
  2. # This is the release of tendermint to pull in.
  3. ENV TM_VERSION 0.17.1
  4. ENV TM_SHA256SUM d57008c63d2d9176861137e38ed203da486febf20ae7d388fb810a75afff8f24
  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://github.com/tendermint/tendermint/releases/download/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`"]