From 3436061ad4d53acbe005cd588499937fffdfee60 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Wed, 8 Mar 2023 16:55:00 +0100 Subject: [PATCH] make windmill compatible with arm64 --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index deec9aebc7..fee5ec5f65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -86,6 +86,7 @@ RUN CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release --features "$feature FROM python:3.11.2-slim-buster +ARG TARGETPLATFORM ARG APP=/usr/src/app @@ -129,6 +130,10 @@ COPY --from=nsjail /nsjail/nsjail /bin/nsjail COPY --from=denoland/deno:latest /usr/bin/deno /usr/bin/deno +# docker does not support conditional COPY and we want to use the same Dockerfile for both amd64 and arm64 and privilege the official image +COPY --from=lukechannings/deno:latest /usr/bin/deno /usr/bin/deno-arm +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then rm /usr/bin/deno-arm; elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then mv /usr/bin/deno-arm /usr/bin/deno; fi + RUN mkdir -p ${APP} WORKDIR ${APP}