dockerfile JVM 配置参考
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| ENV JAVA_OPTS="\ -server \ -Xmx1g \ -Xms1g \ -Xmn512m \ -XX:SurvivorRatio=8 \ -XX:MetaspaceSize=256m \ -XX:MaxMetaspaceSize=512m \ -XX:+UseParallelGC \ -XX:ParallelGCThreads=4 \ -XX:+UseParallelOldGC \ -XX:+UseAdaptiveSizePolicy \ -XX:+PrintGCDetails \ -XX:+PrintTenuringDistribution \ -XX:+PrintGCTimeStamps \ -XX:+HeapDumpOnOutOfMemoryError \ -XX:HeapDumpPath=/ \ -Xloggc:/gc.log \ -XX:+UseGCLogFileRotation \ -XX:NumberOfGCLogFiles=5 \ -XX:GCLogFileSize=10M" ENTRYPOINT java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /app.jar
|
若你觉得我的文章对你有帮助,欢迎点击上方按钮对我打赏