Upgrade to Java 17

This commit is contained in:
Michel ten Voorde
2025-07-16 11:34:06 +02:00
parent ab5bddf1e0
commit 57815f1c3e
3 changed files with 10 additions and 25 deletions

View File

@@ -1,19 +1,2 @@
# Use OpenJDK 17 as the base image
FROM openjdk:17-jdk-slim
# Set the working directory in the container
WORKDIR /app
# Copy the JAR file into the container
# Replace 'your-app.jar' with your actual JAR file name
COPY target/*.jar app.jar
# Expose port 8090
EXPOSE 8090
# Create a non-root user for security
RUN addgroup --system spring && adduser --system spring --ingroup spring
USER spring:spring
# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]
FROM tomcat
COPY target/*.war /usr/local/tomcat/webapps/ROOT.war