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-executor-all/liquidnet-service-executor-main/target/liquidnet-service-executor-main.jar /app/liquidnet-service-executor-main.jar

EXPOSE 8190

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

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