FROM registry.persagy.com/base/centos:v-jdk1.8

ARG WORKER_HOME
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS -XX:+UseContainerSupport -XX:MaxRAMPercentage=75.0 -XX:InitialRAMPercentage=75.0 -XX:MinRAMPercentage=75.0
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezon
RUN yum install -y unzip zip wget telnet tzdata

RUN mkdir -p $WORKER_HOME/config

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

RUN chmod -R 777 $WORKER_HOME/ && chmod -R 777 /mnt/ && chmod -R 777 /usr/ && chmod -R 777 /etc/

WORKDIR $WORKER_HOME

RUN ls

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