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

EXPOSE 9015

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

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