-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (16 loc) · 714 Bytes
/
Dockerfile
File metadata and controls
21 lines (16 loc) · 714 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# FROM --platform=linux/amd64 eclipse-temurin:17-jdk AS build
ARG TARGETARCH
FROM --platform=${BUILDPLATFORM} gradle AS build
WORKDIR /workspace/app
COPY . /workspace/app
RUN --mount=type=cache,target=/root/.gradle ./gradlew clean :bootstrap:build --no-daemon
RUN mkdir -p bootstrap/build/dependency && (cd bootstrap/build/dependency; jar -xf ../libs/*-SNAPSHOT.jar)
FROM --platform=${BUILDPLATFORM} amazoncorretto:21.0.8
VOLUME /tmp
ARG DEPENDENCY=/workspace/app/bootstrap/build/dependency
COPY --from=build ${DEPENDENCY}/BOOT-INF/lib /app/lib
COPY --from=build ${DEPENDENCY}/META-INF /app/META-INF
COPY --from=build ${DEPENDENCY}/BOOT-INF/classes /app
WORKDIR /app
COPY boot.sh /app
ENTRYPOINT ["./boot.sh"]