tip:用Linux系统编译会很快,创建对应文件目录,上传jar包和相关资源!
FROM registry.cn-qingdao.aliyuncs.com/dataease/fabric8-java-alpine-openjdk8-jre:edge-chromium-11
ARG IMAGE_TAG
RUN mkdir -p /opt/apps /opt/dataease/data/feature/full /opt/dataease/drivers /opt/dataease/plugins/default
ADD core/mapFiles/full/ /opt/dataease/data/feature/full/
ADD core/drivers/* /opt/dataease/drivers/
#ADD plugins/default/ /opt/dataease/plugins/default/
ADD core/backend/target/backend-$IMAGE_TAG.jar /opt/apps
ADD config/* /opt/apps/config/WEB-INF/lib/
ADD config/* /deployments/config/WEB-INF/lib/
ENV JAVA_APP_JAR=/opt/apps/backend-$IMAGE_TAG.jar
ENV AB_OFF=true
ENV JAVA_OPTIONS=-Dfile.encoding=utf-8
HEALTHCHECK --interval=15s --timeout=5s --retries=20 --start-period=30s CMD curl -f 127.0.0.1:8081
CMD ["/deployments/run-java.sh"]