dianxin-guizhou-forward
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

Dockerfile 1.0KB

12345678910111213141516171819202122
  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
  18. #.location=$profileName