-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
40 lines (34 loc) · 2.13 KB
/
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
FROM ubuntu:20.04
RUN apt update && DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt install -y curl make clang pkg-config libssl-dev build-essential git jq ncdu bsdmainutils htop && \
curl -s https://api.nodes.guru/logo.sh | bash
ENV DEFUND_NODENAME "MonPham"
ENV GOROOT /usr/local/go
ENV GOPATH /root/go
ENV GO111MODULE on
ENV PATH $PATH:/usr/local/go/bin:/root/go/bin
RUN apt install wget -y
RUN wget -O go1.19.1.linux-amd64.tar.gz https://golang.org/dl/go1.19.1.linux-amd64.tar.gz && \
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.1.linux-amd64.tar.gz && rm go1.19.1.linux-amd64.tar.gz && \
git clone https://github.com/defund-labs/defund && \
cd defund && \
# git checkout v0.2.2 && \
make build && \
mv ./build/defundd /usr/local/bin/
WORKDIR /root
# RUN read -p "Enter node name: " DEFUND_NODENAME
ENV DEFUND_NODENAME=${DEFUND_NODENAME}
RUN echo 'export DEFUND_NODENAME=${DEFUND_NODENAME}' >> ~/.bashrc
# RUN echo 'source ~/.bashrc' >> ~/.bash_profile
# RUN . ~/.bash_profile
CMD defundd init "${DEFUND_NODENAME}" --chain-id=defund-private-4
ENV seeds "[email protected]:26656,[email protected]:26656,[email protected]:56656,[email protected]:17000,[email protected]:45656,74e6425e7ec76e6eaef92643b6181c42d5b8a3b8@defund-testnet-seed.itrocket.net:443"
CMD sed -i "s/^seeds *=.*/seeds = \"$seeds\"/" ~/.defund/config/config.toml
CMD sed -i.default -e "s/^minimum-gas-prices *=.*/minimum-gas-prices = \"0.0025ufetf\"/" ~/.defund/config/app.toml
CMD sed -i "s/pruning *=.*/pruning = \"custom\"/g" ~/.defund/config/app.toml
CMD sed -i "s/pruning-keep-recent *=.*/pruning-keep-recent = \"100\"/g" ~/.defund/config/app.toml
CMD sed -i "s/pruning-interval *=.*/pruning-interval = \"10\"/g" ~/.defund/config/app.toml
CMD wget -O ~/.defund/config/genesis.json https://raw.githubusercontent.com/defund-labs/testnet/main/defund-private-4/genesis.json
CMD defundd tendermint unsafe-reset-all
VOLUME ~/.defund/
EXPOSE 26656
ENTRYPOINT ["defundd", "start"]