forked from tronprotocol/java-tron
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: update java-tron docker deploy (tronprotocol#3330)
- Loading branch information
1 parent
3d34e7d
commit 8f99f3f
Showing
5 changed files
with
127 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
./* | ||
!docker-entrypoint.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,42 @@ | ||
FROM tronprotocol/tron-gradle | ||
FROM tronprotocol/centos7 | ||
|
||
ENV TMP_DIR="/tron-build" | ||
ENV JDK_TAR="jdk-8u202-linux-x64.tar.gz" | ||
ENV JDK_DIR="jdk1.8.0_202" | ||
ENV JDK_MD5="0029351f7a946f6c05b582100c7d45b7" | ||
ENV BASE_DIR="/java-tron" | ||
|
||
|
||
RUN set -o errexit -o nounset \ | ||
&& yum -y install git wget \ | ||
&& wget -P /usr/local https://github.com/frekele/oracle-java/releases/download/8u202-b08/$JDK_TAR \ | ||
&& echo "$JDK_MD5 /usr/local/$JDK_TAR" | md5sum -c \ | ||
&& tar -zxf /usr/local/$JDK_TAR -C /usr/local\ | ||
&& rm /usr/local/$JDK_TAR \ | ||
&& export JAVA_HOME=/usr/local/$JDK_DIR \ | ||
&& export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar \ | ||
&& export PATH=$PATH:$JAVA_HOME/bin \ | ||
&& echo "git clone" \ | ||
&& mkdir -p $TMP_DIR \ | ||
&& cd $TMP_DIR \ | ||
&& git clone https://github.com/tronprotocol/java-tron.git \ | ||
&& cd java-tron \ | ||
&& gradle build | ||
&& git checkout docker \ | ||
&& ./gradlew build -x test \ | ||
&& cd build/distributions \ | ||
&& unzip -o java-tron-1.0.0.zip \ | ||
&& mv java-tron-1.0.0 $BASE_DIR \ | ||
&& rm -rf $TMP_DIR \ | ||
&& rm -rf ~/.gradle \ | ||
&& mv $JAVA_HOME/jre /usr/local \ | ||
&& rm -rf $JAVA_HOME \ | ||
&& yum clean all | ||
|
||
ENV JAVA_HOME="/usr/local/jre" | ||
ENV PATH=$PATH:$JAVA_HOME/bin | ||
|
||
COPY docker-entrypoint.sh $BASE_DIR/bin | ||
|
||
WORKDIR /java-tron | ||
WORKDIR $BASE_DIR | ||
|
||
EXPOSE 18888 | ||
ENTRYPOINT ["./bin/docker-entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
shopt -s nullglob | ||
|
||
echo "./bin/FullNode $@" > command.txt | ||
exec "./bin/FullNode" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters