Files
todo/backend/Dockerfile
almazlar 386f5137c6
All checks were successful
Release and Build Docker Images / release-and-build (push) Successful in 1m38s
fix: update Dockerfile, application properties, and controller mappings for health check and CORS support
2026-02-22 14:08:31 +03:00

22 lines
593 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Build stage ---------------------------------------------------------------
FROM maven:3.9.12-eclipse-temurin-25 AS build
WORKDIR /app
COPY pom.xml .
COPY src ./src
RUN mvn clean package
# Run stage ---------------------------------------------------------------
FROM eclipse-temurin:25-jre
WORKDIR /app
ARG APP_VERSION=dev
ENV APP_VERSION=${APP_VERSION}
# Install curl (required for the healthcheck)
RUN apt-get update && \
apt-get install -y curl && \
rm -rf /var/lib/apt/lists/*
COPY --from=build /app/target/*.jar app.jar
EXPOSE 8082
ENTRYPOINT ["java", "-jar", "app.jar"]