FROM eclipse-temurin:21-jre

COPY ./target/yudao-gateway.jar /app.jar

## 设置 TZ 时区
## 设置 JAVA_OPTS 环境变量，可通过 docker run -e "JAVA_OPTS=" 进行覆盖
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms512m -Xmx512m -DNACOS_CONFIG_SERVER=172.22.222.111:8848 -DDEPLOY_ENV=zoe-dev -DNACOS_USER=nacos -DNACOS_PWD=Qichen5210523..."

## 暴露后端项目的 48080 端口
EXPOSE 48080

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


# docker -H tcp://172.22.222.100:2375 build -t zoe-gateway:1.0.0 .

# docker -H tcp://172.22.222.100:2375 run -d -p 48080:48080 --name=zoe-gateway --network=trim-default  zoe-gateway:1.0.0