Skip to content

Commit 4254b56

Browse files
committed
WIP: new arg that allows us to specify a build platform
1 parent dc7c021 commit 4254b56

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,11 @@
11
#!/bin/bash
2-
docker build -f src/tests/multi-server/builds/Dockerfile.multi-server-prof -t freeradius-prof:latest .
2+
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

Comments
 (0)