diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-06 12:26:37 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-06 12:27:40 +0300 |
| commit | ac05beabdbaa90597ed0cfcea781d5ab44d123ba (patch) | |
| tree | a2554bd2b964201abf17eeb3948155fda0a80581 /scripts/build-with-docker.sh | |
| parent | 1f39f63188accfbf10f102e7daaaf50ae2155d32 (diff) | |
pin Docker build to linux/amd64 for cross-compilation
Adds --platform=linux/amd64 to the Dockerfile FROM directive and to the
docker build/run invocations in scripts/build-with-docker.sh so the ior
binary is always cross-compiled for amd64 regardless of host arch.
Diffstat (limited to 'scripts/build-with-docker.sh')
| -rwxr-xr-x | scripts/build-with-docker.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/build-with-docker.sh b/scripts/build-with-docker.sh index 02eb60f..562d6ab 100755 --- a/scripts/build-with-docker.sh +++ b/scripts/build-with-docker.sh @@ -29,7 +29,7 @@ done if $BUILD_IMAGE; then echo "==> Building Docker image ${IMAGE} (this takes ~15-20 min on first run)..." - docker build --build-arg "GO_VERSION=${GO_VERSION}" -t "${IMAGE}" "${REPO_ROOT}" + docker build --platform=linux/amd64 --build-arg "GO_VERSION=${GO_VERSION}" -t "${IMAGE}" "${REPO_ROOT}" echo "==> Image build complete." fi @@ -41,6 +41,7 @@ if $RUN_BUILD; then # - /sys/kernel/tracing : mage generate reads available syscall tracepoints # - /sys/kernel/btf : mage bpfBuild reads vmlinux BTF for vmlinux.h docker run --rm \ + --platform=linux/amd64 \ --privileged \ -v /sys/kernel/tracing:/sys/kernel/tracing \ -v /sys/kernel/btf:/sys/kernel/btf \ |
