-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.parameterized
37 lines (33 loc) · 1.61 KB
/
Dockerfile.parameterized
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
FROM ghcr.io/anoma/namada:v0.45.1 AS namada
# Install system dependencies
USER root
RUN apt update \
&& apt install -y vim curl wget unzip procps simpleproxy jq less iputils-ping iproute2 tcpdump strace netcat-traditional
RUN cd /tmp \
&& wget https://github.com/denoland/deno/releases/download/v1.46.3/deno-x86_64-unknown-linux-gnu.zip \
&& unzip deno-x86_64-unknown-linux-gnu.zip \
&& mv deno /usr/local/bin \
&& rm deno-x86_64-unknown-linux-gnu.zip
# Configure node
USER namada
ENV NAMADA_NETWORK_CONFIGS_SERVER="https://testnet.namada-dryrun.tududes.com/configs"
ENV CHAIN_ID="namada-dryrun.abaaeaf7b78cb3ac"
ENV DATA_DIR="/home/namada/.local/share/namada/$CHAIN_ID"
ENV WASM_DIR="$DATA_DIR/wasm"
ENV CONFIG_DIR="$DATA_DIR/config.toml"
RUN namadac utils join-network --chain-id $CHAIN_ID --wasm-dir $WASM_DIR
RUN sed -i.bak "s#^log_level *=.*#log_level = \"debug\"#" $CONFIG_DIR
RUN sed -i.bak "s#^laddr = \"tcp://127.0.0.1:26657\"#laddr = \"tcp://0.0.0.0:26657\"#" $CONFIG_DIR
#RUN sed -ie "s#^seeds *=.*#seeds = \"tcp://836a25b5c465352adf17430135888689b9a0f1d6@namada-seed-housefire.mandragora.io:21656\"#" $CONFIG_DIR
#ADD addrbook.json $DATA_DIR/cometbft/config/addrbook.json
# Configure persistent peer set
ARG PEERS
ENV PEERS=${PEERS}
RUN echo "Configuring persistent_peers: $PEERS"
RUN sed -i.bak "s#^persistent_peers *=.*#persistent_peers = \"$PEERS\"#" $CONFIG_DIR
# Install control script
ADD deno.json deno.lock deps.js /
RUN deno cache --import-map=/deno.json --lock=/deno.lock deps.js
ADD lib.js services.js status.js rpc_proxy.js control_node.js sync_proxy.js /
ENTRYPOINT [ "/bin/bash" ]
CMD [ "-c", "/control.js" ]