#FROM 10.38.16.129/bladex/alpine-java:openjdk17_cn_slim
#FROM registry.cn-hangzhou.aliyuncs.com/vic_person/alpine-java:openjdk17_cn_slim
FROM 10.38.16.129:80/bladex/alpine-java:openjdk17_cn_slim
ARG ACTIVE

LABEL maintainer="bladejava@qq.com"

RUN apk add --no-cache tzdata

# 设置时区为上海
ENV TZ=Asia/Shanghai
# 设置时区信息
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

COPY ./target/*.jar /opt/app.jar

ENTRYPOINT ["java", "--add-opens", "java.base/java.lang=ALL-UNNAMED", "--add-opens", "java.base/java.lang.reflect=ALL-UNNAMED", "-Djava.security.egd=file:/dev/./urandom", "-jar", "/opt/app.jar"]

CMD ["--spring.profiles.active=${ACTIVE}"]
