FROM liferay/jdk21:latest

ARG env

ENV ENVIRMENT=${env:-"pro"}


RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo 'Asia/Shanghai' >/etc/timezone
COPY ./target/gdt-auto.jar /zhyx/gdt-auto.jar

ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.util=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Dspring.profiles.active=${ENVIRMENT}", "-jar", "/zhyx/gdt-auto.jar"]
