forked from cometbft/cometbft
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile.debug
More file actions
32 lines (26 loc) · 1.19 KB
/
Dockerfile.debug
File metadata and controls
32 lines (26 loc) · 1.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# We need to build in a Linux environment to support C libraries, e.g. RocksDB.
# We use Debian instead of Alpine, so that we can use binary database packages
# instead of spending time compiling them.
FROM injectivelabs/cometbft-db-testing:v1.0.4-inj
RUN apt-get -qq update -y && apt-get -qq upgrade -y >/dev/null
RUN apt-get -qq install -y zsh vim >/dev/null
RUN go install github.com/go-delve/delve/cmd/dlv@latest
# Set up build directory /src/cometbft
ENV COMETBFT_BUILD_OPTIONS badgerdb,rocksdb,nostrip,clock_skew,bls12381
WORKDIR /src/cometbft
# Fetch dependencies separately (for layer caching)
COPY go.mod go.sum ./
RUN go mod download
# Build CometBFT and install into /usr/bin/cometbft
COPY . .
RUN echo $COMETBFT_BUILD_OPTION && make build && cp build/cometbft /usr/bin/cometbft
COPY test/e2e/docker/entrypoint-delve /usr/bin/entrypoint-builtin
RUN cd test/e2e && make node && cp build/node /usr/bin/app
# Set up runtime directory. We don't use a separate runtime image since we need
# e.g. leveldb and rocksdb which are already installed in the build image.
WORKDIR /cometbft
VOLUME /cometbft
ENV CMTHOME=/cometbft
ENV GORACE "halt_on_error=1"
EXPOSE 26656 26657 26660 6060 2345 2346
STOPSIGNAL SIGTERM