forked from tronprotocol/tron-rosetta-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ubuntu
41 lines (33 loc) · 1.16 KB
/
Dockerfile.ubuntu
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
FROM tronprotocol/ubuntu18-jdk8
ENV BASE_DIR="/FullNode"
ENV JAR_NAME="tron-rosetta-api-1.0.0.jar"
ENV DATA_DIR="/data"
ENV LOG_DIR="/logs"
ENV NET_TYPE="mainnet"
ENV XMS="8G"
ENV XMX="8G"
ENV JVM_OPTIONS="-Xms$XMS -Xmx$XMX -XX:NewRatio=7 \
-XX:+UseConcMarkSweepGC -XX:+PrintGCDetails -Xloggc:./logs/gc.log \
-XX:+PrintGCDateStamps -XX:+CMSParallelRemarkEnabled -XX:ReservedCodeCacheSize=256m \
-XX:+CMSScavengeBeforeRemark"
ENV TRON_OPTIONS=""
RUN apt-get update \
&& apt-get install -y git python-virtualenv \
&& git clone https://github.com/tronprotocol/tron-rosetta-api.git /tron-rosetta-api \
&& set -o errexit -o nounset \
&& mkdir -p $BASE_DIR $DATA_DIR $LOG_DIR \
&& cd $BASE_DIR \
&& ln -s $LOG_DIR logs \
&& ln -s $DATA_DIR data \
&& cd /tron-rosetta-api \
&& ./gradlew build -xtest -xcheck --refresh-dependencies \
&& cp docker-entrypoint.sh $BASE_DIR \
&& mkdir -p $BASE_DIR/conf \
&& cp -r src/main/resources/net_conf/* $BASE_DIR/conf \
&& cd build/libs \
&& cp $JAR_NAME $BASE_DIR \
&& rm -rf ~/.gradle \
&& rm -rf /tron-rosetta-api
WORKDIR $BASE_DIR
EXPOSE 8080
ENTRYPOINT ["./docker-entrypoint.sh"]