summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rwxr-xr-xscripts/build-with-docker.sh3
2 files changed, 3 insertions, 2 deletions
diff --git a/Dockerfile b/Dockerfile
index d190056..22b706a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM rockylinux:9-minimal
+FROM --platform=linux/amd64 rockylinux:9-minimal
# Update GO_VERSION here to upgrade the Go toolchain baked into the image.
ARG GO_VERSION=1.26.2
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 \