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.

37 lines
1.3 KiB

  1. # We need to build in a Linux environment to support C libraries, e.g. RocksDB.
  2. # We use Debian instead of Alpine, so that we can use binary database packages
  3. # instead of spending time compiling them.
  4. FROM golang:1.15
  5. RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null
  6. RUN apt-get -qq install -y libleveldb-dev librocksdb-dev >/dev/null
  7. # Set up build directory /src/tendermint
  8. ENV TENDERMINT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb
  9. WORKDIR /src/tendermint
  10. # Fetch dependencies separately (for layer caching)
  11. COPY go.mod go.sum ./
  12. RUN go mod download
  13. # Build Tendermint and install into /usr/bin/tendermint
  14. COPY . .
  15. RUN make build && cp build/tendermint /usr/bin/tendermint
  16. COPY test/e2e/docker/entrypoint* /usr/bin/
  17. # FIXME: Temporarily disconnect maverick node until it is redesigned
  18. # RUN cd test/e2e && make maverick && cp build/maverick /usr/bin/maverick
  19. RUN cd test/e2e && make app && cp build/app /usr/bin/app
  20. # Set up runtime directory. We don't use a separate runtime image since we need
  21. # e.g. leveldb and rocksdb which are already installed in the build image.
  22. WORKDIR /tendermint
  23. VOLUME /tendermint
  24. ENV TMHOME=/tendermint
  25. ENV TM_LEGACY_P2P=true
  26. ENV TM_P2P_QUEUE="priority"
  27. EXPOSE 26656 26657 26660 6060
  28. ENTRYPOINT ["/usr/bin/entrypoint"]
  29. CMD ["start"]
  30. STOPSIGNAL SIGTERM