调整dockerfile 启动指令

This commit is contained in:
wangliwen 2022-10-25 09:33:20 +08:00
parent 3b5975d921
commit 1ee75d834d
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@ FROM ibm-semeru-runtimes:open-11-jre
ENV JAR_FILE renren-admin.jar
ENV TAR_FILE renren-admin-1.0.tar.gz
ENV ACTIVE "dev"
ENV Xmx "1G"
ENV VERTICLE_HOME /usr/hisense
EXPOSE 8888
@ -14,4 +15,4 @@ HEALTHCHECK --interval=3m --timeout=3s --start-period=3m --retries=5 CMD curl --
WORKDIR $VERTICLE_HOME/renren-admin
ENTRYPOINT ["sh", "-c"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx1G -XX:ReservedCodeCacheSize=64m -XX:InitialCodeCacheSize=64m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $JAR_FILE --spring.profiles.active=$ACTIVE"]
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=64m -XX:InitialCodeCacheSize=64m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $JAR_FILE --spring.profiles.active=$ACTIVE"]