mirror of
https://github.com/dalbodeule/chibot-chzzk-bot.git
synced 2025-06-08 23:08:20 +00:00
dockerfile update
This commit is contained in:
parent
c669943f87
commit
2b999c5acb
19
Dockerfile
19
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"]
|
Loading…
x
Reference in New Issue
Block a user