Skip to content

Commit 230973e

Browse files
authored
Create Dockerfile
1 parent 36e23be commit 230973e

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# --- Stage 1: Build the application ---
2+
FROM maven:3.9.6-eclipse-temurin-17 AS build
3+
4+
WORKDIR /app
5+
COPY pom.xml ./
6+
COPY jlmap-vaadin-demo ./jlmap-vaadin-demo
7+
COPY jlmap-api ./jlmap-api
8+
COPY jlmap-core ./jlmap-core
9+
COPY jlmap-vaadin ./jlmap-vaadin
10+
RUN mvn -f jlmap-vaadin-demo/pom.xml clean package -Pproduction
11+
12+
# --- Stage 2: Create the final image ---
13+
FROM eclipse-temurin:17-jre
14+
15+
WORKDIR /app
16+
COPY --from=build /app/jlmap-vaadin-demo/target/jlmap-vaadin-demo-2.0.0.jar app.jar
17+
EXPOSE 80
18+
ENTRYPOINT ["java", "-Dserver.port=80", "-jar", "app.jar"]

0 commit comments

Comments
 (0)