FROM livingobjects/jre8:latest
#设置时区

ARG FILE_NAME="default"
ENV PARAMS=""
COPY  ${FILE_NAME}   /target
RUN mv /target/*.jar /app.jar && rm -rf /target
RUN  ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
ENTRYPOINT ["/bin/sh","-c","java -Dfile.encoding=utf8  -Djava.security.egd=file:/dev/.urandom -javaagent:app.jar -jar  app.jar ${PARAMS}" ]
