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.

33 lines
1.1 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.16
  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. RUN cd test/e2e && make node && cp build/node /usr/bin/app
  18. # Set up runtime directory. We don't use a separate runtime image since we need
  19. # e.g. leveldb and rocksdb which are already installed in the build image.
  20. WORKDIR /tendermint
  21. VOLUME /tendermint
  22. ENV TMHOME=/tendermint
  23. EXPOSE 26656 26657 26660 6060
  24. ENTRYPOINT ["/usr/bin/entrypoint"]
  25. CMD ["start"]
  26. STOPSIGNAL SIGTERM