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-platform/liquidnet-service-platform-impl/target/liquidnet-service-platform-impl.jar /app/liquidnet-service-platform-impl.jar

EXPOSE 9003

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

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