FROM image.ibizlab.cn/library/openjdk:8-jre-alpine

ENV TZ="Asia/Shanghai" \
    SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
    IBIZ_SLEEP=0 \
    JAVA_OPTS=""

CMD echo "The application will start in ${IBIZ_SLEEP}s..." && \
    sleep ${IBIZ_SLEEP} && \
    java ${JAVA_OPTS} -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /{{projectName}}-provider-{{lowerCase api.codeName}}.jar

EXPOSE {{#if app.httpPort}}{{app.httpPort}}{{else}}8080{{/if}}

ADD {{projectName}}-provider-{{lowerCase api.codeName}}.jar /{{projectName}}-provider-{{lowerCase api.codeName}}.jar
