Skip to content

Commit

Permalink
neonvm: explicitly specify platform in FROM section of the kernel bui…
Browse files Browse the repository at this point in the history
…lder image to have cp binary of the correct architecture

Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Sep 26, 2024
1 parent fc7a6c2 commit a2e0364
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions neonvm/hack/kernel/Dockerfile.kernel-builder
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ RUN cd linux-${KERNEL_VERSION} && make ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gn
# Copy the kernel image to a separate step
# Use alpine so that `cp` is available when loading custom kernels for the runner pod.
# See the neonvm controller's pod creation logic for more detail.
FROM alpine:3.19 AS kernel_amd64
FROM --platform=linux/amd64 alpine:3.19 AS kernel_amd64
ARG KERNEL_VERSION
COPY --from=build_amd64 /build/linux-${KERNEL_VERSION}/arch/x86/boot/bzImage /vmlinuz

Expand All @@ -73,6 +73,6 @@ RUN cd linux-${KERNEL_VERSION} && make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gn
# Copy the kernel image to a separate step
# Use alpine so that `cp` is available when loading custom kernels for the runner pod.
# See the neonvm controller's pod creation logic for more detail.
FROM alpine:3.19 AS kernel_arm64
FROM --platform=linux/arm64 alpine:3.19 AS kernel_arm64
ARG KERNEL_VERSION
COPY --from=build_arm64 /build/linux-${KERNEL_VERSION}/arch/arm64/boot/Image /vmlinuz

0 comments on commit a2e0364

Please sign in to comment.