dockerfile aktualisiert
This commit is contained in:
11
dockerfile
11
dockerfile
@@ -3,12 +3,17 @@ FROM eclipse-temurin:17-jdk AS build
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy Maven files and source code
|
||||
# Install Maven
|
||||
RUN apt-get update && \
|
||||
apt-get install -y maven && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy project files
|
||||
COPY pom.xml .
|
||||
COPY src ./src
|
||||
|
||||
# Build the Spring Boot app
|
||||
RUN ./mvnw clean package -DskipTests
|
||||
# Build the app
|
||||
RUN mvn clean package -DskipTests
|
||||
|
||||
# Stage 2: Runtime
|
||||
FROM eclipse-temurin:17-jdk
|
||||
|
||||
Reference in New Issue
Block a user