aboutsummaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile15
1 files changed, 7 insertions, 8 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index a94e3fe8..79a5eacf 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -19,16 +19,16 @@ FROM --platform=$BUILDPLATFORM jlink-base AS jlink-arm64-on-amd64
19# When cross-building the Docker image, we have the wrong toolchain for the 19# When cross-building the Docker image, we have the wrong toolchain for the
20# target architecture. We forcibly override the target for the objcopy tool. 20# target architecture. We forcibly override the target for the objcopy tool.
21# The cross toolchain is not available in Amazon Linux 2023. 21# The cross toolchain is not available in Amazon Linux 2023.
22RUN --mount=type=cache,target=/var/cache/apt \ 22RUN apt-get update && \
23 apt-get update && \
24 apt-get install binutils-aarch64-linux-gnu && \ 23 apt-get install binutils-aarch64-linux-gnu && \
25 ln -sf /usr/bin/aarch64-linux-gnu-objcopy /usr/bin/objcopy 24 ln -sf /usr/bin/aarch64-linux-gnu-objcopy /usr/bin/objcopy && \
25 rm -rf /var/lib/apt/lists/*
26 26
27FROM --platform=$BUILDPLATFORM jlink-base AS jlink-amd64-on-arm64 27FROM --platform=$BUILDPLATFORM jlink-base AS jlink-amd64-on-arm64
28RUN --mount=type=cache,target=/var/cache/apt \ 28RUN apt-get update && \
29 apt-get update && \
30 apt-get install binutils-x86-64-linux-gnu && \ 29 apt-get install binutils-x86-64-linux-gnu && \
31 ln -sf /usr/bin/x86_64-linux-gnu-objcopy /usr/bin/objcopy 30 ln -sf /usr/bin/x86_64-linux-gnu-objcopy /usr/bin/objcopy && \
31 rm -rf /var/lib/apt/lists/*
32 32
33FROM --platform=$BUILDPLATFORM jlink-$TARGETARCH-on-$BUILDARCH as jlink 33FROM --platform=$BUILDPLATFORM jlink-$TARGETARCH-on-$BUILDARCH as jlink
34RUN jlink --no-header-files --no-man-pages --compress=2 \ 34RUN jlink --no-header-files --no-man-pages --compress=2 \
@@ -38,8 +38,7 @@ RUN jlink --no-header-files --no-man-pages --compress=2 \
38 38
39FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal AS base 39FROM public.ecr.aws/amazonlinux/amazonlinux:2023-minimal AS base
40# The launcher script generated by Gradle uses xargs to parse the argument list. 40# The launcher script generated by Gradle uses xargs to parse the argument list.
41RUN --mount=type=cache,id=yum-$TARGETARCH,target=/var/cache/apt \ 41RUN dnf install -y findutils && \
42 dnf install -y findutils && \
43 dnf clean all 42 dnf clean all
44# The first layer contains the slimmed down JRE. 43# The first layer contains the slimmed down JRE.
45COPY --link --from=jlink /jlink /usr/lib/java 44COPY --link --from=jlink /jlink /usr/lib/java