jcce-market/Dockerfile

24 lines
466 B
Docker

FROM jcce/maven:3-alpine3.16.2 AS builder
WORKDIR /app
LABEL stage=javabuilder
COPY pom.xml ./
COPY src ./src
RUN mvn clean install -Dmaven.test.skip=true -Ptest
FROM jcce/openjdk:8-alpine
WORKDIR /app
ARG JAR_FILE=/app/target/jcce-market.jar
COPY --from=builder ${JAR_FILE} app.jar
EXPOSE 8015
ENV TZ=Asia/Shanghai JAVA_OPTS="-Xms256m -Xmx512m -Djava.security.egd=file:/dev/./urandom"
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -jar app.jar $APP_OPTS" ]