Commit 55f766ad by zhangxingmin

执行命令启动jar,并设置JVM内存参数

parent 725a3594
...@@ -6,7 +6,7 @@ LABEL maintainer="zxm<2060197959@qq.com>" ...@@ -6,7 +6,7 @@ LABEL maintainer="zxm<2060197959@qq.com>"
RUN mkdir -p /home/app RUN mkdir -p /home/app
# 拷贝项目jar - 使用可执行的 fat JAR # 拷贝项目jar - 使用可执行的 fat JAR
COPY target/yd-product-api-1.0-SNAPSHOT-exec.jar /home/app/yd-product-api.jar COPY target/yd-product-api-1.0-SNAPSHOT-exec.jar /home/app/yd-product-api.jar
# 执行命令启动jar # 执行命令启动jar,并设置JVM内存参数
ENTRYPOINT ["java", "-jar", "/home/app/yd-product-api.jar"] ENTRYPOINT ["java", "-Xmx256m", "-Xms128m", "-jar", "/home/app/yd-product-api.jar"]
# 暴露端口 # 暴露端口
EXPOSE 9466 EXPOSE 9466
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