Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Specify `amd64` platform to fix `ov` builds on macOS (#4932)

Dhruv Bhanushali6b5a19cbe423
diff --git a/docker/dev_env/run.sh b/docker/dev_env/run.sh
index 4adcce196..48d356427 100755
--- a/docker/dev_env/run.sh
+++ b/docker/dev_env/run.sh
@@ -26,6 +26,9 @@ shared_args=(
run_args=(
-d
--name "$container_name"
+ # Since we have build an amd64 image, we must specify the platform to
+ # suppress warnings about platform mismatch.
+ --platform linux/amd64
# Use host network so things like Sphinx and the frontend that run directly in `ov`
# will have ports available on the host (and this way we don't have to manually map each one)
--network host
diff --git a/ov b/ov
index 68006d129..29410dc0d 100755
--- a/ov
+++ b/ov
@@ -92,7 +92,8 @@ init)
;;
build)
- docker build "${@:2}" -t openverse-dev_env:latest "$dev_env"
+ # k6 does not install on aarch64, so we must specify the platform on macOS.
+ docker build "${@:2}" --platform linux/amd64 -t openverse-dev_env:latest "$dev_env"
;;
setup-env)