This is an automated email from the ASF dual-hosted git repository.
fokko pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/avro.git
The following commit(s) were added to refs/heads/main by this push:
new 85f99b063 Allow user to define BUILDPLATFORM to build Docker image
(#3038)
85f99b063 is described below
commit 85f99b063fc706169badaa1777f59f4e40c7c249
Author: JB Onofré <[email protected]>
AuthorDate: Tue Jul 23 15:55:34 2024 +0200
Allow user to define BUILDPLATFORM to build Docker image (#3038)
---
build.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/build.sh b/build.sh
index 07c1b2a7d..d5fa659fb 100755
--- a/build.sh
+++ b/build.sh
@@ -310,7 +310,9 @@ do
echo "RUN mkdir -p /home/$USER_NAME/.m2/repository"
} > Dockerfile
- export BUILDPLATFORM=$(docker info --format
"{{.OSType}}/{{.Architecture}}")
+ if [ -z "$BUILDPLATFORM" ]; then
+ export BUILDPLATFORM=$(docker info --format
"{{.OSType}}/{{.Architecture}}")
+ fi
# Include the ruby gemspec for preinstallation.
# shellcheck disable=SC2086
tar -cf- Dockerfile $DOCKER_EXTRA_CONTEXT | DOCKER_BUILDKIT=1 docker
build $DOCKER_BUILD_XTRA_ARGS --build-arg="BUILDPLATFORM=${BUILDPLATFORM}" -t
"$DOCKER_IMAGE_NAME" -