dianxin-guizhou-forward
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

20 lines
1.0KB

  1. FROM java:8
  2. MAINTAINER king <1609724385@qq.com>
  3. EXPOSE 8102
  4. VOLUME /tmp
  5. COPY target/gd202101.jar gd202101.jar
  6. COPY --from=hengyunabc/arthas:latest /opt/arthas /opt/arthas
  7. ENV TimeZone=Asia/Shanghai
  8. ENV active=dev
  9. ENV profileName="classpath:/application.properties"
  10. ENV JAVA_OPTS="-Xmx256M -Xms256M"
  11. RUN if [ "$active" = "pro1" ] ; then $profileName="classpath:/application-pro1.properties"; fi
  12. RUN if [ "$active" = "pro2" ] ; then $profileName="classpath:/application-pro2.properties"; fi
  13. RUN if [ "$active" = "pro3" ] ; then $profileName="classpath:/application-pro3.properties"; fi
  14. #RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime #RUN echo "Asia/Shanghai" > /etc/timezone
  15. RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone
  16. #ENTRYPOINT java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /gd202101.jar --spring.profiles.active=$active
  17. ENTRYPOINT java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /gd202101.jar --spring.config.location=$profileName