Upgrade to Java 17
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user