Skip to content

Commit

Permalink
feat(cli): enforce build for linux/riscv64 platform
Browse files Browse the repository at this point in the history
since the target is always a Cartesi Machine (riscv64), cartesi build
should enforce the docker build environment via --platform argument
  • Loading branch information
endersonmaia committed Sep 9, 2024
1 parent 98098ad commit 3ca76b7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/big-ghosts-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/cli": patch
---

enforce build for linux/riscv64 platform
10 changes: 9 additions & 1 deletion apps/cli/src/commands/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,15 @@ export default class BuildApplication extends BaseCommand<
this.debug(
`building docker image and writing result to ${buildResult}`,
);
const args = ["buildx", "build", "--load", "--iidfile", buildResult];
const args = [
"buildx",
"build",
"--load",
"--iidfile",
buildResult,
"--platform",
"linux/riscv64",
];
if (options.target) {
args.push("--target", options.target);
}
Expand Down

0 comments on commit 3ca76b7

Please sign in to comment.