FROM docker.io/openjdk:8u151-slim

MAINTAINER saber "saber.zhicheng@foxmail.com"

EXPOSE 10010

RUN mkdir -p /opt/app/java
COPY target/application.jar /opt/app/java/application.jar
RUN mkdir -p /etc/java
COPY target/classes/config.properties /etc/java/application.conf
CMD ["java", "-XX:+UseParNewGC", "-XX:+CMSParallelRemarkEnabled", "-XX:ParallelGCThreads=10", "-XX:+CMSScavengeBeforeRemark", "-XX:ParallelCMSThreads=10", "-XX:+CMSPermGenSweepingEnabled", "-XX:+CMSClassUnloadingEnabled", "-Xmx4096m", "-Xms512m", "-XX:PermSize=512m", "-XX:MaxPermSize=4096m", "-Dspring.application.name=syria-api", "-DCONFIG_FILE=file:/etc/java/application.conf", "-Dfile.encoding=UTF8", "-Duser.timezone=GMT+08", "-jar", "/opt/app/java/application.jar"]
