-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (17 loc) · 778 Bytes
/
Copy pathDockerfile
File metadata and controls
29 lines (17 loc) · 778 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
29
# syntax=docker/dockerfile:1
FROM eclipse-temurin:17-jdk AS builder
WORKDIR /workspace
# Copy the project source after .dockerignore filtering so ignored local build,
# IDE, Gradle cache, and Git metadata files are not sent into the image build.
COPY . .
RUN tar -czf /tmp/mm2-offset-map-source.tar.gz .
RUN ./gradlew --no-daemon :app:bootJar
FROM eclipse-temurin:17-jre
WORKDIR /app
RUN addgroup --system --gid 10001 mm2-offset-map \
&& adduser --system --uid 10001 --ingroup mm2-offset-map mm2-offset-map
COPY --from=builder /workspace/app/build/libs/*.jar /app/mm2-offset-map.jar
COPY --from=builder /tmp/mm2-offset-map-source.tar.gz /app/source/mm2-offset-map-source.tar.gz
USER 10001:10001
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/app/mm2-offset-map.jar"]