forked from celestiaorg/celestia-core
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathDockerfile
42 lines (32 loc) · 897 Bytes
/
Dockerfile
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
33
34
35
36
37
38
39
40
41
42
FROM golang:1.21
# Grab deps (jq, hexdump, xxd, killall)
RUN apt-get update && \
apt-get install -y --no-install-recommends \
jq bsdmainutils vim-common psmisc netcat curl
# Setup CometBFT repo
ENV REPO $GOPATH/src/github.com/cometbft/cometbft
ENV GOBIN $GOPATH/bin
WORKDIR $REPO
# Copy in the code
# TODO: rewrite to only copy Makefile & other files?
COPY . $REPO
# Install the vendored dependencies
# docker caching prevents reinstall on code change!
RUN make tools
# install ABCI CLI
RUN make install_abci
# install CometBFT
RUN make install
RUN cometbft testnet \
--config $REPO/test/docker/config-template.toml \
--node-dir-prefix="mach" \
--v=4 \
--populate-persistent-peers=false \
--o=$REPO/test/p2p/data
# Now copy in the code
# NOTE: this will overwrite whatever is in vendor/
COPY . $REPO
# expose the volume for debugging
VOLUME $REPO
EXPOSE 26656
EXPOSE 26657