调整Dockerfile java程序启动方式
This commit is contained in:
parent
342b740a12
commit
df9d9bd901
|
@ -14,5 +14,4 @@ RUN cd /usr/share/fonts/truetype/dejavu && chmod 755 * && fc-cache -fv
|
|||
HEALTHCHECK --interval=3m --timeout=3s --start-period=3m --retries=5 CMD curl --silent --fail 127.0.0.1:8888/ucs-admin/census/center/v2/whole_amount || exit 1
|
||||
|
||||
WORKDIR $VERTICLE_HOME/renren-admin
|
||||
ENTRYPOINT ["sh", "-c"]
|
||||
CMD ["exec java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx$Xmx -XX:ReservedCodeCacheSize=240m -XX:InitialCodeCacheSize=240m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 $VERTICLE_HOME/renren-admin/$JAR_FILE --spring.profiles.active=$ACTIVE"]
|
||||
ENTRYPOINT ["sh", "-c","dockerstart.sh $Xmx $VERTICLE_HOME $JAR_FILE $ACTIVE"]
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh
|
||||
Xmx $1
|
||||
VERTICLE_HOME $2
|
||||
JAR_FILE $3
|
||||
ACTIVE $4
|
||||
|
||||
java -jar -Dfile.encoding=utf-8 -server -Xshareclasses -Xtune:virtualized -Xms512M -Xmx${Xmx} -XX:ReservedCodeCacheSize=240m -XX:InitialCodeCacheSize=240m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:ConcGCThreads=1 -XX:ParallelGCThreads=2 -XX:ZCollectionInterval=120 -XX:ZAllocationSpikeTolerance=5 -Duser.timezone=GMT+08 ${VERTICLE_HOME}/renren-admin/${JAR_FILE} --spring.profiles.active=${ACTIVE}
|
Loading…
Reference in New Issue