diff --git a/Dockerfile b/Dockerfile index de1f4f8..02afca9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,10 @@ -# Stage 1: Build the JAR file -FROM gradle:jdk21 as build - -WORKDIR /app - -# Copy the Gradle files and source code -COPY build.gradle.kts settings.gradle.kts gradlew gradle.properties ./ -COPY gradle gradle -COPY src src - -# Build the project using Gradle -RUN ./gradlew build - -# Stage 2: Run the JAR file using JDK 21 +# Use a base image with JDK 21 for the final image FROM openjdk:21-jdk WORKDIR /app -# Copy the JAR file from the build stage -COPY --from=build /app/build/libs/*.jar app.jar +# Copy the JAR file from the TeamCity build artifacts +COPY build/libs/chzzk_bot-*.jar app.jar # Set the entry point ENTRYPOINT ["java", "-jar", "app.jar"] \ No newline at end of file