2025-05-31 18:49:33 +08:00

24 lines
677 B
Docker
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

FROM registry.cn-hangzhou.aliyuncs.com/wu-lazy/wu-framework-parent:jdk-17.0.7-x64
MAINTAINER wujiawei <1207537021@qq.com>
RUN echo "Asia/Shanghai" > /etc/timezone
ENV APP_JAR_NAME=$APP_NAME \
JAVA_OPTS="-Xms512m -Xmx1024m -XX:+UseContainerSupport -XX:InitialRAMPercentage=50.0 -XX:MaxRAMPercentage=80.0 -Djdk.management.jfr.VmFlagRepository.useCgroups=false -Djava.security.egd=file:/dev/./urandom" \
PARAMS=""
#UseContainerSupport启用容器感知内存和 CPU 限制。
#InitialRAMPercentage/MaxRAMPercentage自动计算 JVM 堆内存上限,避免 OOM。
COPY target/*.jar /app.jar
ENTRYPOINT exec java -server $JAVA_OPTS -jar /app.jar $PARAMS