diff --git a/tools/docker/Makefile b/tools/docker/Makefile index dfde496a29..8b8b3ff281 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -212,7 +212,7 @@ define manylinux_inner = .PHONY: python_$1_manylinux_cp$2_$3 python_$1_manylinux_cp$2_$3: python/$1/manylinux.Dockerfile export/python/manylinux/build-manylinux.sh @docker image rm -f ${IMAGE}:$$@ 2>/dev/null - ${DOCKER_BUILD_CMD} \ + ${DOCKER_BUILDX_CMD} --platform linux/$1 \ --tag ${IMAGE}:$$@ \ --build-arg GIT_BRANCH=${OR_TOOLS_BRANCH} \ --build-arg GIT_SHA1=${OR_TOOLS_SHA1} \ diff --git a/tools/release/build_delivery_manylinux_amd64.sh b/tools/release/build_delivery_manylinux_amd64.sh index 5c49e443fe..735b69a018 100755 --- a/tools/release/build_delivery_manylinux_amd64.sh +++ b/tools/release/build_delivery_manylinux_amd64.sh @@ -73,8 +73,9 @@ function build_delivery() { cd "${RELEASE_DIR}" || exit 2 # Build env + # https://github.com/containerd/containerd/blob/v1.4.3/platforms/platforms.go#L63 echo -n "Build ${ORTOOLS_IMG}:env..." | tee -a "${ROOT_DIR}/build.log" - docker buildx build \ + docker buildx build --platform linux/amd64 \ --tag "${ORTOOLS_IMG}":env \ --build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \ --build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \ @@ -84,7 +85,7 @@ function build_delivery() { # Build devel echo -n "Build ${ORTOOLS_IMG}:devel..." | tee -a "${ROOT_DIR}/build.log" - docker buildx build \ + docker buildx build --platform linux/amd64 \ --tag "${ORTOOLS_IMG}":devel \ --build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \ --build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \ @@ -94,7 +95,7 @@ function build_delivery() { # Build delivery echo -n "Build ${ORTOOLS_IMG}:${ORTOOLS_DELIVERY}..." | tee -a "${ROOT_DIR}/build.log" - docker buildx build \ + docker buildx build --platform linux/amd64 \ --tag "${ORTOOLS_IMG}":"${ORTOOLS_DELIVERY}" \ --build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \ --build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \ diff --git a/tools/release/publish_delivery_manylinux_amd64.sh b/tools/release/publish_delivery_manylinux_amd64.sh index bb694ed92a..a80d2e9598 100755 --- a/tools/release/publish_delivery_manylinux_amd64.sh +++ b/tools/release/publish_delivery_manylinux_amd64.sh @@ -70,7 +70,7 @@ function publish_delivery() { # Publish delivery echo -n "Build ${ORTOOLS_IMG}:publish_${ORTOOLS_DELIVERY}..." | tee -a "${ROOT_DIR}/publish.log" - docker buildx build \ + docker buildx build --platform linux/amd64 \ --tag "${ORTOOLS_IMG}":"publish_${ORTOOLS_DELIVERY}" \ --build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \ --build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \ diff --git a/tools/release/publish_delivery_manylinux_arm64.sh b/tools/release/publish_delivery_manylinux_arm64.sh index 653b0b89a4..3c5f648853 100755 --- a/tools/release/publish_delivery_manylinux_arm64.sh +++ b/tools/release/publish_delivery_manylinux_arm64.sh @@ -70,7 +70,7 @@ function publish_delivery() { # Publish delivery echo -n "Build ${ORTOOLS_IMG}:publish_${ORTOOLS_DELIVERY}..." | tee -a "${ROOT_DIR}/publish.log" - docker buildx build \ + docker buildx build --platform linux/arm64 \ --tag "${ORTOOLS_IMG}":"publish_${ORTOOLS_DELIVERY}" \ --build-arg ORTOOLS_GIT_BRANCH="${ORTOOLS_BRANCH}" \ --build-arg ORTOOLS_GIT_SHA1="${ORTOOLS_SHA1}" \