forked from vlddm/binance-smart-chain-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (30 loc) · 1.08 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
41
42
FROM debian:bullseye-slim
RUN apt-get update -y \
&& apt-get install -y curl jq unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV VERSION=1.1.16
RUN curl -LOJ "https://github.com/bnb-chain/bsc/releases/download/v${VERSION}/mainnet.zip" && \
curl -LOJ "https://github.com/bnb-chain/bsc/releases/download/v${VERSION}/geth_linux" && \
unzip mainnet.zip -d / && \
# mv /mainnet/* /. && rm -rf /mainnet && \
sed -i 's/^HTTPHost.*/HTTPHost = "0.0.0.0"/' /config.toml && \
sed -i '/^WSPort.*/a WSHost = "0.0.0.0"' /config.toml && \
sed -i 's/^HTTPVirtualHosts.*/HTTPVirtualHosts = ["*"]/' /config.toml && \
sed -i '/Node\.LogConfig/,/^$/d' /config.toml && \
mv geth_linux /usr/local/bin/bsc && \
chmod +x /usr/local/bin/bsc
ENV BSC_DATADIR=/root/.ethereum
COPY docker-entrypoint.sh /entrypoint.sh
#VOLUME ["$BSC_DATADIR"]
# NODE P2P
EXPOSE 30311/udp
EXPOSE 30311/tcp
# pprof / metrics
EXPOSE 6060/tcp
# HTTP based JSON RPC API
EXPOSE 8545/tcp
# WebSocket based JSON RPC API
EXPOSE 8546/tcp
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bsc"]