build: add Docker and Compose setup
This commit is contained in:
parent
f573ae19d0
commit
85a6f1fbbc
3 changed files with 52 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal 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"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue