提交 c054a960 编写于 作者: Crimson's avatar Crimson

docker添加时区配置,默认为"Asia/Shanghai",平台参数配置例"timezone=Asia/Shanghai"

上级 466bda33
......@@ -2,20 +2,29 @@
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
<#assign timezone = "Asia/Shanghai">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepApp()??>
<#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
</#if>
<#if sysrun.getPSDevSlnMSDepApp().getUserParam("timezone","")?? && sysrun.getPSDevSlnMSDepApp().getUserParam("timezone","")!="">
<#assign timezone = sysrun.getPSDevSlnMSDepApp().getUserParam("timezone","")>
<#elseif sysrun.getPSDevSlnMSDepApp().getPSDCMSPlatform().getUserParam("timezone","")?? && sysrun.getPSDevSlnMSDepApp().getPSDCMSPlatform().getUserParam("timezone","")!="">
<#assign timezone = sysrun.getPSDevSlnMSDepApp().getPSDCMSPlatform().getUserParam("timezone","")>
</#if>
</#if>
</#if>
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
ENV TZ=${timezone} \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBIZ_SLEEP=0 \
JAVA_OPTS=""
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
CMD echo "The application will start in ${r'${IBIZ_SLEEP}'}s..." && \
sleep ${r'${IBIZ_SLEEP}'} && \
java ${r'${JAVA_OPTS}'} -Djava.security.egd=file:/dev/./urandom -jar /${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar
......
......@@ -2,20 +2,29 @@
TARGET=PSSYSSERVICEAPI
</#ibiztemplate>
<#assign httpPort = "8081">
<#assign timezone = "Asia/Shanghai">
<#if sysrun?? >
<#if sysrun.getPSDevSlnMSDepAPI()??>
<#if sysrun.getPSDevSlnMSDepAPI().getHttpPort()??>
<#assign httpPort = sysrun.getPSDevSlnMSDepAPI().getHttpPort()?c>
<#assign httpPort = sysrun.getPSDevSlnMSDepAPI().getHttpPort()?c>
</#if>
<#if sysrun.getPSDevSlnMSDepAPI().getUserParam("timezone","")?? && sysrun.getPSDevSlnMSDepAPI().getUserParam("timezone","")!="">
<#assign timezone = sysrun.getPSDevSlnMSDepAPI().getUserParam("timezone","")>
<#elseif sysrun.getPSDevSlnMSDepAPI().getPSDCMSPlatform().getUserParam("timezone","")?? && sysrun.getPSDevSlnMSDepAPI().getPSDCMSPlatform().getUserParam("timezone","")!="">
<#assign timezone = sysrun.getPSDevSlnMSDepAPI().getPSDCMSPlatform().getUserParam("timezone","")>
</#if>
</#if>
</#if>
FROM openjdk:8-jre-alpine
ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
ENV TZ=${timezone} \
SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
IBIZ_SLEEP=0 \
JAVA_OPTS=""
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
CMD echo "The application will start in ${r'${IBIZ_SLEEP}'}s..." && \
sleep ${r'${IBIZ_SLEEP}'} && \
java ${r'${JAVA_OPTS}'} -Djava.security.egd=file:/dev/./urandom -jar /${pub.getCodeName()?lower_case}-provider-${api.getCodeName()?lower_case}.jar
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册