From 69f6a5e30be04abc1a4287b8261bd1bff24ebc4e Mon Sep 17 00:00:00 2001 From: Enderson Maia Date: Tue, 22 Oct 2024 15:25:21 -0300 Subject: [PATCH] feat(cli): enforce build for linux/riscv64 platform since the target is always a Cartesi Machine (riscv64), cartesi build should enforce the docker build environment via --platform argument --- .changeset/big-ghosts-rescue.md | 5 +++++ apps/cli/src/builder/docker.ts | 2 ++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/big-ghosts-rescue.md diff --git a/.changeset/big-ghosts-rescue.md b/.changeset/big-ghosts-rescue.md new file mode 100644 index 00000000..4794ee5b --- /dev/null +++ b/.changeset/big-ghosts-rescue.md @@ -0,0 +1,5 @@ +--- +"@cartesi/cli": patch +--- + +enforce build for linux/riscv64 platform diff --git a/apps/cli/src/builder/docker.ts b/apps/cli/src/builder/docker.ts index 98826482..7dc63dbf 100644 --- a/apps/cli/src/builder/docker.ts +++ b/apps/cli/src/builder/docker.ts @@ -26,6 +26,8 @@ const buildImage = async (options: ImageBuildOptions): Promise => { const args = [ "buildx", "build", + "--platform", + "linux/riscv64", "--file", dockerfile, "--load",