docker-compose and docker files

This commit is contained in:
2026-01-18 08:27:51 -05:00
parent 65b91df22c
commit ec07e5a0c8
3 changed files with 28 additions and 2 deletions

View File

@@ -1,6 +1,6 @@
# Stage 1: Build the application (The Build Stage)
# Use a Java SDK image with Maven pre-installed
FROM maven:3.9-jdk-17-slim AS build
FROM maven:3.9.6-eclipse-temurin-21 AS build
# Set the working directory inside the container
WORKDIR /app
@@ -17,8 +17,9 @@ RUN mvn clean package -DskipTests
# Stage 2: Create the final lightweight image (The Runtime Stage)
# Use a smaller Java Runtime Environment (JRE) image for a smaller footprint
FROM openjdk:17-jre-slim
FROM eclipse-temurin:21-jre
ENV SPRING_PROFILES_ACTIVE=prod
# Set the working directory in the final image
WORKDIR /app