FROM docker.platomix.net:10000/module/openjdk:17-amd64

MAINTAINER platomix

ARG JAR_FILE

ENV JAVA_OPTS="-Xms1g -Xmx1g -DNACOS_HOST=nacos-svc.default -DNACOS_GROUP=MCP"
ENV SPRINGBOOT_PARAMS="--spring.profiles.active=k8s"
ENV SW_AGENT_NAME="gmetry::gmetry-xxljob-admin"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="skywalking-oap:11800"

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

COPY target/${JAR_FILE} /app.jar
#COPY wait-for-it.sh /wait-for-it.sh
#
#RUN chmod a+x /wait-for-it.sh
#
##自启动配置,等待注册中心就绪
#ENTRYPOINT /wait-for-it.sh nacos:8848 -t 0 -- java -server ${JAVA_OPTS} -jar /app.jar ${SPRINGBOOT_PARAMS}
ENTRYPOINT java -server ${JAVA_OPTS} -jar /app.jar ${SPRINGBOOT_PARAMS}