build: add Docker and Compose setup

This commit is contained in:
bumpsoo 2026-06-09 07:48:28 +09:00
parent f573ae19d0
commit 85a6f1fbbc
3 changed files with 52 additions and 0 deletions

21
Dockerfile Normal file
View file

@ -0,0 +1,21 @@
FROM eclipse-temurin:21-jdk AS build
WORKDIR /app
COPY gradlew ./
COPY gradle gradle
COPY build.gradle settings.gradle ./
COPY src src
RUN chmod +x gradlew \
&& ./gradlew bootJar -x test --no-daemon
FROM eclipse-temurin:21-jre
WORKDIR /app
COPY --from=build /app/build/libs/reservation-demo-*.jar app.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "app.jar"]