123456789101112131415161718192021 |
- # FROM maven:3-eclipse-temurin-17-alpine as builder
- FROM maven:3.8.4-openjdk-11-slim AS builder
- ARG JAVA_OPTS
- ENV JAVA_OPTS=$JAVA_OPTS
- WORKDIR /app
- VOLUME [ "/app" ]
- COPY . /app
- RUN mvn clean package -DskipTests
- FROM openjdk:8-jdk-alpine as runner
- VOLUME /tmp
- ARG JAVA_OPTS
- ENV JAVA_OPTS=$JAVA_OPTS
- WORKDIR /app2
- # COPY target/swagger-demo-0.0.1-SNAPSHOT.jar workspace.jar
- COPY --from=builder /app/target/swagger-demo-0.0.1-SNAPSHOT.jar .
- EXPOSE 8080
- # ENTRYPOINT exec java $JAVA_OPTS -jar swagger-demo-0.0.1-SNAPSHOT.jar
- # For Spring-Boot project, use the entrypoint below to reduce Tomcat startup time.
- ENTRYPOINT exec java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar swagger-demo-0.0.1-SNAPSHOT.jar
|