FROM openjdk:8-jre-alpineENV DJ_SLEEP 0ENV PROFILE dev# 替换阿里云的源RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories# 更新源、同步时间RUN apk update \ && apk add ca-certificates \ && apk add --no-cache tzdata \ && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && date# add directly the warADD *.war /app.warRUN sh -c 'touch /app.war'VOLUME /tmp EXPOSE 80CMD echo "The application will start in ${DJ_SLEEP}s..." && \ sleep ${DJ_SLEEP} && \ java -Xmx4096m -jar -Ddefault.client.encoding="UTF-8" -Dfile.encoding="UTF-8" -Duser.language="Zh" -Duser.region="CN" app.war --spring.profiles.active=${PROFILE}