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-client/liquidnet-client-job/target/liquidnet-client-job.jar /app/liquidnet-client-job.jar

EXPOSE 8090

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

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