Commit 262ee44b authored by zhuyunfeng's avatar zhuyunfeng

Update Dockerfile

parent 8acb686b
FROM registry-vpc.cn-hangzhou.aliyuncs.com/schbrain-base/jdk:11 as builder
WORKDIR app
COPY ${JAR_FILE} app.jar
RUN java -Djarmode=layertools -jar app.jar extract
FROM registry-vpc.cn-hangzhou.aliyuncs.com/schbrain-base/jdk:11
WORKDIR app
COPY --from=builder app/dependencies/ ./
COPY --from=builder app/spring-boot-loader/ ./
COPY --from=builder app/snapshot-dependencies/ ./
COPY --from=builder app/application/ ./
COPY build-script/scripts/*.sh /app/
RUN chmod +x /app/*.sh
ENV PROFILE=${PROFILE} \
APP_NAME='${APP_NAME}' \
# Don't remove it, it's used in entrypoint.sh
EXT_JVM_OPTS='${JAVA_OPTS}' \
# https://skywalking.apache.org/docs/skywalking-java/next/en/setup/service-agent/java-agent/configurations
SW_AGENT_NAME='${APP_NAME}' \
SW_LOGGING_LEVEL=WARN \
SW_LOGGING_MAX_HISTORY_FILES=15 \
SW_LOGGING_DIR=/data/logs/skywalking \
SW_JDBC_TRACE_SQL_PARAMETERS=true \
SW_PLUGIN_DUBBO_COLLECT_CONSUMER_ARGUMENTS=true \
SW_PLUGIN_DUBBO_COLLECT_PROVIDER_ARGUMENTS=true \
SW_AGENT_COLLECTOR_BACKEND_SERVICES='skywalking-oap-server.devops:11800' \
SW_AGENT_TRACE_IGNORE_PATH='OPTIONS:/**,GET:/actuator/**,Mysql/**,HikariCP/**,Redisson/PING'
ENV JVM_OPTS="-javaagent:/opt/skywalking-agent/skywalking-agent.jar \
-XX:InitialRAMPercentage=60 -XX:MaxRAMPercentage=60 \
-XX:-OmitStackTraceInFastThrow -XX:+PrintCommandLineFlags \
-XX:CompressedClassSpaceSize=64M -XX:MaxMetaspaceSize=300m \
-XX:+UseG1GC -XX:G1HeapRegionSize=16m -XX:InitiatingHeapOccupancyPercent=30 \
-Xlog:gc*=debug:/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"
ENTRYPOINT ["/app/entrypoint.sh"]
FROM registry.cn-hangzhou.aliyuncs.com/schbrain-base/nginx:latest as builder
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