FROM openjdk:8-jdk-alpine
VOLUME /tmp
ARG PROFILE_ENV
ENV profile_env=$PROFILE_ENV
ARG JAR_FILE
ADD ${JAR_FILE} app.jar
RUN sed -i 's/http:\/\/dl-cdn.alpinelinux.org/https:\/\/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig \
    && rm -rf /var/cache/apk/*
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai  /etc/localtime
ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-Dspring.cloud.config.profile=$profile_env","-jar","-Xms200M","-Xmx512M","/app.jar"]