FROM maven:3.6.0-alpine

RUN apk add ca-certificates && \
    apk add tzdata && \
    ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone

# make source folder
RUN mkdir -p /usr/app
WORKDIR /usr/app
# install maven dependency packages (keep in image)

COPY data-parent /usr/app/data-parent
COPY data-common /usr/app/data-common
COPY data-base /usr/app/data-base
COPY data-mid /usr/app/data-mid
COPY data-show /usr/app/data-show
COPY data-finance /usr/app/data-finance

RUN cd /usr/app/data-parent && mvn -T 1C install  -pl ../data-show/finance-accounting-entry -am

#指定容器启动程序及参数   <ENTRYPOINT> "<CMD>"
EXPOSE 8080
ENTRYPOINT ["java","-jar","/usr/app/data-finance/finance-accounting-entry/target/finance-accounting-entry-1.0-SNAPSHOT.jar"]