Commit 4be2920e authored by liaozan's avatar liaozan 🏀

Polish

parent d884d0a7
......@@ -10,9 +10,9 @@ COPY --from=builder app/spring-boot-loader/ ./
COPY --from=builder app/snapshot-dependencies/ ./
COPY --from=builder app/application/ ./
COPY build-script/entrypoint.sh entrypoint.sh
COPY build-script/scripts/*.sh /app/
RUN chmod +x /app/entrypoint.sh
RUN chmod +x /app/*.sh
ENV EXT_JVM_OPTS="${JAVA_OPTS}"
......@@ -20,8 +20,9 @@ ENV PROFILE="${PROFILE}"
ENV JVM_OPTS="-javaagent:/opt/skywalking-agent/skywalking-agent.jar=agent.service_name=${APP_NAME},collector.backend_service=skywalking-oap-server.devops:11800\
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false\
-XX:MaxRAMPercentage=50 -XX:MaxMetaspaceSize=512m -XX:+ClassUnloading\
-XX:+UseG1GC -XX:G1HeapRegionSize=8m -XX:+UseStringDeduplication -Xlog:gc*:/data/logs/gc/gc-%t.log:time,uptime:filecount=50\
-XX:+UseG1GC -XX:G1HeapRegionSize=8m -XX:+UseStringDeduplication -XX:+ClassUnloading\
-XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=50 -XX:MaxMetaspaceSize=512m\
-Xlog:gc*=info,gc+heap=debug,gc+age=trace:/data/logs/gc/gc-%t.log:time:filecount=20,filesize=20m\
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdump/heapdump.hprof -XX:OnOutOfMemoryError=/app/dump-file-rollover.sh\
-XX:-OmitStackTraceInFastThrow -XX:+PrintCommandLineFlags"
......
FROM registry-vpc.cn-hangzhou.aliyuncs.com/schbrain-base/jdk:11 as builder
WORKDIR app
RUN wget https://schbrain-attachment-online.oss-cn-hangzhou.aliyuncs.com/font/font.sh \
&& chmod +x /app/font.sh \
&& /app/font.sh \
&& rm /app/font.sh
COPY ${JAR_FILE} app.jar
RUN java -Djarmode=layertools -jar app.jar extract
......@@ -14,9 +10,11 @@ COPY --from=builder app/spring-boot-loader/ ./
COPY --from=builder app/snapshot-dependencies/ ./
COPY --from=builder app/application/ ./
COPY build-script/entrypoint.sh entrypoint.sh
RUN wget https://schbrain-attachment-online.oss-cn-hangzhou.aliyuncs.com/font/font.sh && chmod +x /app/font.sh && /app/font.sh && rm /app/font.sh
RUN chmod +x /app/entrypoint.sh
COPY build-script/scripts/*.sh /app/
RUN chmod +x /app/*.sh
ENV EXT_JVM_OPTS="${JAVA_OPTS}"
......@@ -24,8 +22,9 @@ ENV PROFILE="${PROFILE}"
ENV JVM_OPTS="-javaagent:/opt/skywalking-agent/skywalking-agent.jar=agent.service_name=${APP_NAME},collector.backend_service=skywalking-oap-server.devops:11800\
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false\
-XX:MaxRAMPercentage=60 -XX:MaxMetaspaceSize=256m\
-XX:+UseG1GC -XX:+UseStringDeduplication -XX:G1HeapRegionSize=4m -Xlog:gc*:/data/logs/gc/gc-%t.log:time,uptime:filecount=50\
-XX:+UseG1GC -XX:G1HeapRegionSize=8m -XX:+UseStringDeduplication -XX:+ClassUnloading\
-XX:InitialRAMPercentage=50 -XX:MaxRAMPercentage=50 -XX:MaxMetaspaceSize=512m\
-Xlog:gc*=info,gc+heap=debug,gc+age=trace:/data/logs/gc/gc-%t.log:time:filecount=20,filesize=20m\
-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/heapdump/heapdump.hprof -XX:OnOutOfMemoryError=/app/dump-file-rollover.sh\
-XX:-OmitStackTraceInFastThrow -XX:+PrintCommandLineFlags"
......
#!/bin/bash
# arthas has been built into the /opt/arthas directory of the jdk image
java -jar /opt/arthas/arthas-boot.jar
#!/bin/sh
datetime=$(date "+%Y%m%d%H%M%S")
dumps=$(find /data/heapdump -name '*.hprof')
for dump in $dumps
do
mv $dump `echo "$dump.$datetime"`
done
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment