ARG FROM_IMAGE
# todo: mvn 拆分依赖。减小代码层
# https://accenture.github.io/blog/2016/10/28/smart-java-docker-containers.html
# FROM ${FROM_IMAGE} as BUILD

FROM ccr.ccs.tencentyun.com/qg-qa/jdk1.8:chromium-centos

WORKDIR /home/quant_group

ARG SYSTEM_NAME
ARG BUILD_SCHEMA

ENV SYSTEM_NAME=$SYSTEM_NAME \
  BUILD_SCHEMA=$BUILD_SCHEMA

RUN echo -e "${BUILD_SCHEMA//@/\n}" >> ./build_info 

COPY docker-entrypoint.sh .
COPY readyCheck.sh .
# COPY --from=BUILD /code/* ./project/
COPY ./lib/* ./project/
COPY ./config/* ./project/
COPY ./application.properties ./project/
COPY ./*.jar ./project/

CMD ["sh", "docker-entrypoint.sh"]
