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