FROM java:8-arm
ARG profile
ENV SPRING_PROFILES_ACTIVE=${profile}
ADD target/jeelowcode-admin-2.0.1.jar /jeelowcode-admin-docker.jar

## 设置 TZ 时区
ENV TZ=Asia/Shanghai
## 设置 JAVA_OPTS 环境变量，可通过 docker run -e "JAVA_OPTS=" 进行覆盖
ENV JAVA_OPTS="-Xms512m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
ENTRYPOINT ["java","-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8090", "-Xms1024m", "-Xmx1024m", "-Xmn256m", "-XX:+HeapDumpOnOutOfMemoryError","-XX:HeapDumpPath=/mnt/isr/log/dump/jeelowcode-admin","-jar","/jeelowcode-admin-docker.jar"]
EXPOSE 48080