github.com/badrootd/celestia-core@v0.0.0-20240305091328-aa4207a4b25d/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.22-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 maverick && cp build/maverick /usr/bin/maverick 22 RUN cd test/e2e && make node && cp build/node /usr/bin/app 23 24 # Set up runtime directory. We don't use a separate runtime image since we need 25 # e.g. leveldb and rocksdb which are already installed in the build image. 26 WORKDIR /cometbft 27 VOLUME /cometbft 28 ENV CMTHOME=/cometbft 29 30 EXPOSE 26656 26657 26660 6060 31 ENTRYPOINT ["/usr/bin/entrypoint"] 32 CMD ["node"] 33 STOPSIGNAL SIGTERM