github.com/badrootd/nibiru-cometbft@v0.37.5-0.20240307173500-2a75559eee9b/test/e2e/docker/Dockerfile (about) 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.21-bullseye 5 6 RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null 7 RUN apt-get -qq install -y libleveldb-dev librocksdb-dev >/dev/null 8 9 # Set up build directory /src/cometbft 10 ENV COMETBFT_BUILD_OPTIONS badgerdb,boltdb,cleveldb,rocksdb 11 WORKDIR /src/cometbft 12 13 # Fetch dependencies separately (for layer caching) 14 COPY go.mod go.sum ./ 15 RUN go mod download 16 17 # Build CometBFT and install into /usr/bin/cometbft 18 COPY . . 19 RUN make build && cp build/cometbft /usr/bin/cometbft 20 COPY test/e2e/docker/entrypoint* /usr/bin/ 21 RUN cd test/e2e && make node && cp build/node /usr/bin/app 22 23 # Set up runtime directory. We don't use a separate runtime image since we need 24 # e.g. leveldb and rocksdb which are already installed in the build image. 25 WORKDIR /cometbft 26 VOLUME /cometbft 27 ENV CMTHOME=/cometbft 28 29 EXPOSE 26656 26657 26660 6060 30 ENTRYPOINT ["/usr/bin/entrypoint"] 31 CMD ["node"] 32 STOPSIGNAL SIGTERM