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.

56 lines
1.7 KiB

9 years ago
  1. # stage 1 Generate Tendermint Binary
  2. FROM golang:1.17-alpine as builder
  3. RUN apk update && \
  4. apk upgrade && \
  5. apk --no-cache add make
  6. COPY / /tendermint
  7. WORKDIR /tendermint
  8. RUN make build-linux
  9. # stage 2
  10. FROM golang:1.17-alpine
  11. LABEL maintainer="hello@tendermint.com"
  12. # Tendermint will be looking for the genesis file in /tendermint/config/genesis.json
  13. # (unless you change `genesis_file` in config.toml). You can put your config.toml and
  14. # private validator file into /tendermint/config.
  15. #
  16. # The /tendermint/data dir is used by tendermint to store state.
  17. ENV TMHOME /tendermint
  18. # OS environment setup
  19. # Set user right away for determinism, create directory for persistence and give our user ownership
  20. # jq and curl used for extracting `pub_key` from private validator while
  21. # deploying tendermint with Kubernetes. It is nice to have bash so the users
  22. # could execute bash commands.
  23. RUN apk update && \
  24. apk upgrade && \
  25. apk --no-cache add curl jq bash && \
  26. addgroup tmuser && \
  27. adduser -S -G tmuser tmuser -h "$TMHOME"
  28. # Run the container with tmuser by default. (UID=100, GID=1000)
  29. USER tmuser
  30. WORKDIR $TMHOME
  31. # p2p, rpc and prometheus port
  32. EXPOSE 26656 26657 26660
  33. STOPSIGNAL SIGTERM
  34. COPY --from=builder /tendermint/build/tendermint /usr/bin/tendermint
  35. # You can overwrite these before the first run to influence
  36. # config.json and genesis.json. Additionally, you can override
  37. # CMD to add parameters to `tendermint node`.
  38. ENV PROXY_APP=kvstore MONIKER=dockernode CHAIN_ID=dockerchain
  39. COPY ./DOCKER/docker-entrypoint.sh /usr/local/bin/
  40. ENTRYPOINT ["docker-entrypoint.sh"]
  41. CMD ["start"]
  42. # Expose the data directory as a volume since there's mutable state in there
  43. VOLUME [ "$TMHOME" ]