We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc7c021 commit 4254b56Copy full SHA for 4254b56
1 file changed
src/tests/multi-server/scripts/build_image.sh
@@ -1,2 +1,11 @@
1
#!/bin/bash
2
-docker build -f src/tests/multi-server/builds/Dockerfile.multi-server-prof -t freeradius-prof:latest .
+PLATFORM_ARG=""
3
+
4
+# This allows us to build an image on Apple Silicon where the base image was built on an linux/amd64 platform.
5
+if [ "${BUILD_PLATFORM}" = "amd64" ]; then
6
+ PLATFORM_ARG="--platform=linux/amd64"
7
+elif [ -n "${BUILD_PLATFORM}" ]; then
8
+ PLATFORM_ARG="--platform=linux/${BUILD_PLATFORM}"
9
+fi
10
11
+docker build ${PLATFORM_ARG} -f src/tests/multi-server/builds/Dockerfile.multi-server-prof -t freeradius-prof:latest .
0 commit comments