FROM openjdk:8-alpine MAINTAINER wfq WORKDIR /code COPY . . RUN wget https://dlcdn.apache.org/maven/maven-3/3.9.2/binaries/apache-maven-3.9.2-bin.tar.gz RUN tar -zxvf apache-maven-3.9.2-bin.tar.gz RUN pwd RUN ls -la ENV PATH /code/apache-maven-3.9.2/bin:$PATH ENV MAVEN_HOME=/code/apache-maven-3.9.2 RUN mvn -v RUN mvn install -Dmaven.test.skip=true ## 更新apk源 RUN apk update ## 设置时区 RUN apk add -U tzdata RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ## 设置输出格式 ENV LANG en_US.UTF-8 ENV LANGUAGE en_US:en ENV LC_ALL en_US.UTF-8 ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Duser.region=CN -Duser.timezone=GMT=GMT+8 -Djava.security.egd=file:/dev/./urandom -jar target/demo.jar"]