FROM registry.cn-beijing.aliyuncs.com/zhengzai-base/jdk:8u302

ARG VERSION=1.0.0

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

COPY opentelemetry-javaagent.jar /app/opentelemetry-javaagent.jar
COPY docker-entrypoint.sh /app/docker-entrypoint.sh
RUN chmod +x /app/docker-entrypoint.sh

COPY liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/target/liquidnet-service-kylin-impl.jar /app/liquidnet-service-kylin-impl.jar

EXPOSE 9002

ENV SERVICE_NAME=kylin-prod
ENV SERVICE_VERSION=${VERSION}
ENV APP_JAR=/app/liquidnet-service-kylin-impl.jar
ENV OTEL_JAVA_OPTS="-Dotel.traces.exporter=none -Dotel.metrics.exporter=none -Dotel.logs.exporter=none"

ENTRYPOINT ["/app/docker-entrypoint.sh"]