You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AssistDB_V2_Back/Dockerfile

28 lines
699 B

# FROM eclipse-temurin:19-jdk-jammy
#
# WORKDIR /app
#
# COPY .mvn/ .mvn
# COPY mvnw pom.xml ./
# RUN ./mvnw dependency:resolve
#
# COPY src ./src
#
# CMD ["./mvnw", "spring-boot:run"]
#
# Build
#
FROM maven:3.9.0-eclipse-temurin-19-focal AS build
COPY src /home/app/src
COPY pom.xml /home/app
RUN mvn -f /home/app/pom.xml clean package -DskipTests
#
# Package stage
#
FROM openjdk:19-jdk-alpine
WORKDIR /usr/local/lib
RUN mkdir git
RUN mkdir json
COPY src/main/resources/json /usr/local/lib/json
COPY --from=build /home/app/target/assistDbBackend-0.0.1-SNAPSHOT.jar /usr/local/lib/assistDbBackend.jar
CMD ["java","-jar", "-Dapplication.config.path=classpath:", "/usr/local/lib/assistDbBackend.jar"]