FROM registry.persagy.com/base/centos:v-jdk1.8
MAINTAINER zhangqiankun<zhangqiankun@persagy.com>

LABEL tier backend
LABEL product integrated
LABEL project calendar-center
LABEL name 工作历

# 不再指定内存大小限制，采用容器，请结合k8s yaml文件limits memory使用
ENV JAVA_OPTS -Dfile.encoding=UTF-8 -XX:+UseContainerSupport -XX:InitialRAMPercentage=75 -XX:MaxRAMPercentage=75 -XX:MinRAMPercentage=75
ENV TZ Asia/Shanghai
ARG WORKER_HOME

RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
#增加一个arthas的包，方便应用排查问题
RUN yum install -y unzip zip wget telnet tzdata
COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas

RUN mkdir -p $WORKER_HOME/config

COPY *.jar $WORKER_HOME/
COPY entrypoint.sh $WORKER_HOME/

WORKDIR $WORKER_HOME

RUN ls

ENTRYPOINT ["sh","./entrypoint.sh"]

