From f3d72a6115a8ee4068ae79bb4bff984d9e2a1939 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Thu, 18 Jul 2024 15:22:06 -0400 Subject: [PATCH] Fix platform=amd64 syntax (#76) Docker still requires amd64 to build these steps for some reason, but the syntax has changed in more recent versions. I don't know why or remember from 2 years ago. But here we are. --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49e8627..54cc8c4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,14 +5,14 @@ COPY . . RUN cargo test --release RUN cargo build --release -FROM amd64/rust:alpine AS wasm +FROM --platform=amd64 rust:alpine AS wasm WORKDIR /home/rust/src RUN apk --no-cache add curl musl-dev RUN curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh COPY . . RUN wasm-pack build --target web rustpad-wasm -FROM amd64/node:lts-alpine AS frontend +FROM --platform=amd64 node:lts-alpine AS frontend WORKDIR /usr/src/app COPY package.json package-lock.json ./ COPY --from=wasm /home/rust/src/rustpad-wasm/pkg rustpad-wasm/pkg