forked from ltonetwork/lto-public-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
43 lines (31 loc) · 1.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
41
42
FROM hseeberger/scala-sbt:11.0.10_1.5.2_2.13.6 AS build
ENV LTO_LOG_LEVEL="INFO"
ENV LTO_HEAP_SIZE="2g"
WORKDIR /usr/src
COPY . .
RUN git status
RUN test -f target/lto-public-all-*.jar || sbt build
RUN test -f genesis.conf || cp genesis.example.conf genesis.conf
RUN java -cp target/lto-public-all-*.jar com.ltonetwork.GenesisBlockGenerator genesis.conf lto-custom.conf \
&& echo 'include "local.conf"' >> lto-custom.conf
FROM openjdk:11-jre-slim
ENV LTO_LOG_LEVEL="INFO"
ENV LTO_HEAP_SIZE="2g"
ENV LTO_CONFIG_FILE="/lto/configs/lto-config.conf"
RUN apt-get -qq update -y
# Install python
RUN apt-get -q install -y python3 python3-pip curl \
&& ln -s /usr/bin/python3 python \
&& pip3 install -q --upgrade pip
RUN pip3 install requests pyhocon pywaves==0.8.19 tqdm
# Install cron
RUN apt-get -q install -y cron
COPY starter.py /lto-node/
COPY fee-vote.py /lto-node/
COPY entrypoint.sh /lto-node/
COPY --from=build /usr/src/target/lto-public-all-*.jar /lto-node/lto-public-all.jar
COPY lto-*.conf /lto-node/
COPY --from=build /usr/src/lto-custom.conf /lto-node/
VOLUME /lto
EXPOSE 6869 6868 6863
ENTRYPOINT ["/lto-node/entrypoint.sh"]