-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 720 Bytes
/
Copy pathDockerfile
File metadata and controls
28 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM eclipse-temurin:21-jdk-jammy AS build
WORKDIR /app
COPY gradle/ gradle/
COPY gradle.properties build.gradle.kts settings.gradle gradlew ./
COPY backend/src backend/src
COPY backend/build.gradle.kts backend/
COPY shared/src shared/src
COPY shared/build.gradle.kts shared/
COPY entrypoint.sh ./entrypoint.sh
RUN chmod +x ./gradlew
RUN ./gradlew --no-daemon :backend:bootJar
# Now create a minimal build with only the bootJar
FROM eclipse-temurin:21-jre-jammy
WORKDIR /app
RUN mkdir osm
RUN mkdir graph-cache
COPY --from=build /app/backend/build/libs/timestamp.jar /app/timestamp.jar
COPY --from=build /app/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh
EXPOSE 8080
CMD ["/app/entrypoint.sh"]