FROM amd64/openjdk:8u312-jdk-oracle
MAINTAINER zhangqiankun<zhangqiankun@persagy.com>

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

FROM registry.persagy.com/base/centos:v-jdk1.8
ARG WORKER_HOME
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS -Dfile.encoding=UTF-8 -XX:+UseContainerSupport -XX:InitialRAMPercentage=80 -XX:MaxRAMPercentage=80 -XX:MinRAMPercentage=80
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"]

