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

RUN cd /usr/app/data-parent && mvn -T 1C install  -pl ../data-base/base-sync-stock-wms -am

#指定容器启动程序及参数   <ENTRYPOINT> "<CMD>"
EXPOSE 8080
ENTRYPOINT ["java","-Xms30m","-Xmx80m","-jar","/usr/app/data-base/base-sync-stock-wms/target/base-sync-stock-wms-1.0-SNAPSHOT.jar"]