Dockerfile.ftl 1.4 KB
Newer Older
ibizdev's avatar
ibizdev committed
1 2 3 4
<#ibiztemplate>
TARGET=PSSYSAPP
</#ibiztemplate>
<#assign httpPort = "8080">
5
<#assign timezone = "Asia/Shanghai">
ibizdev's avatar
ibizdev committed
6 7 8 9 10
<#if sysrun?? >
  <#if sysrun.getPSDevSlnMSDepApp()??>
    <#if sysrun.getPSDevSlnMSDepApp().getHttpPort()??>
      <#assign httpPort = sysrun.getPSDevSlnMSDepApp().getHttpPort()?c>
    </#if>
11 12 13 14 15
    <#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>
ibizdev's avatar
ibizdev committed
16 17 18 19 20
  </#if>
</#if>

FROM openjdk:8-jre-alpine

21 22
ENV TZ=${timezone} \
    SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
23
    IBIZ_SLEEP=0 \
ibizdev's avatar
ibizdev committed
24 25
    JAVA_OPTS=""

26 27
CMD echo "The application will start in ${r'${IBIZ_SLEEP}'}s..." && \
    sleep ${r'${IBIZ_SLEEP}'} && \
demoadmin's avatar
demoadmin committed
28
    java ${r'${JAVA_OPTS}'} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar
ibizdev's avatar
ibizdev committed
29 30 31 32

EXPOSE ${httpPort}

ADD ${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar /${pub.getCodeName()?lower_case}-app-${app.getPKGCodeName()?lower_case}.jar