FROM 172.16.46.66:10043/base-service/report-base:x86_64-ubuntu_22-jre21-2.0.0
#ARG BASE_IMAGE=172.16.46.66:10043/base-service/skywalking-agent-jre:9.7.0
#FROM ${BASE_IMAGE}
RUN mkdir -p /appdata/server
WORKDIR /appdata/server
## 将后端项目的 Jar 文件，复制到镜像中
COPY ./target/qms-server.jar app.jar

## 设置 TZ 时区
ENV TZ=Asia/Shanghai
ENV JAVA_OPTS="-Xms512m -Xmx512m"
#ENV SW_AGENT_HOME=/opt/skywalking/agent
#ENV SW_AGENT_NAME=qms-server
#ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES=172.16.46.63:30201
#ENV AGENT_JAVA_OPTS="-javaagent:${SW_AGENT_HOME}/skywalking-agent.jar -Dskywalking.agent.service_name=${SW_AGENT_NAME} -Dskywalking.collector.backend_service=${SW_AGENT_COLLECTOR_BACKEND_SERVICES}"

# 暴露端口
EXPOSE 48205

## 启动后端项目
CMD java ${AGENT_JAVA_OPTS} ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar app.jar
