FROM nginx:1.16.1

MAINTAINER lijie<lijie@persagy.com>

ARG PROGRAM_ID
ARG PORT_LOCAL

LABEL tier=frontend
LABEL product=bdtp
LABEL project=adm-frontend
LABEL name=$PROGRAM_ID

#ENV JAVA_OPTS -Dfile.encoding=UTF-8 -Xms300m -Xmx1024m
ENV TZ Asia/Shanghai
ENV WORKER_HOME /usr/persagy/saas-web
ENV CONFIG_PATH /data/SpringCloud
ENV PROGRAM_NAME $PROGRAM_ID

WORKDIR $WORKER_HOME

RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list \
    && apt-get update \
    && apt-get install -y --no-install-recommends tzdata unzip \
    && apt-get autoclean \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/*

RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' > /etc/timezone
COPY *.zip $WORKER_HOME/
RUN unzip *.zip
RUN rm -rf ./*.zip