Theater-Database / Dockerfile
AI-RESEARCHER-2024's picture
add app files
4ec2f9d verified
raw
history blame
595 Bytes
# Use Maven image to build the application
FROM maven:3.9-eclipse-temurin-21 AS build
# Set working directory
WORKDIR /app
# Copy pom.xml and download dependencies
COPY pom.xml .
RUN mvn dependency:go-offline
# Copy source code
COPY src ./src
# Build the application
RUN mvn clean package -DskipTests
# Use JRE for runtime
FROM eclipse-temurin:21-jre
# Set working directory
WORKDIR /app
# Copy the jar from build stage
COPY --from=build /app/target/*.jar app.jar
# Expose port 7860 (Hugging Face Spaces default)
EXPOSE 7860
# Run the application
ENTRYPOINT ["java", "-jar", "app.jar"]