From b8d04398caa66c040f1a316f9cf79293056b888d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rennfanz=2C=20Bj=C3=B6rn?= Date: Mon, 1 Jul 2024 14:50:19 +0200 Subject: [PATCH] Fixed build problems of docker containers on GitHub agents. --- scripts/build/build-arch.sh | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/scripts/build/build-arch.sh b/scripts/build/build-arch.sh index f67c2b9..803a517 100755 --- a/scripts/build/build-arch.sh +++ b/scripts/build/build-arch.sh @@ -86,17 +86,17 @@ fi CMD_WRAPPER=linux64 case $PLATFORM_TAG in - linux_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; PYLON_ARCH=x86_64 ;; - linux_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; - linux_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;; - linux_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; PYLON_ARCH=aarch64 ;; - manylinux_2_31_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; PYLON_ARCH=x86_64 ;; - manylinux_2_28_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; - manylinux_2_28_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;; - manylinux_2_31_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; PYLON_ARCH=aarch64 ;; - manylinux2014_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="quay.io/pypa/manylinux2014_x86_64"; PYLON_ARCH=x86_64 ;; - manylinux2014_i686) QEMU_ARCH="i386"; BASE_IMAGE="quay.io/pypa/manylinux2014_i686"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; - manylinux2014_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="quay.io/pypa/manylinux2014_aarch64"; PYLON_ARCH=aarch64 ;; + linux_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; DOCKER_PLATFORM="linux/amd64"; PYLON_ARCH=x86_64 ;; + linux_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; DOCKER_PLATFORM="linux/i386"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; + linux_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; DOCKER_PLATFORM="linux/arm/v7"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;; + linux_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; DOCKER_PLATFORM="linux/arm64"; PYLON_ARCH=aarch64 ;; + manylinux_2_31_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="amd64/$BASE_IMAGE64"; DOCKER_PLATFORM="linux/amd64"; PYLON_ARCH=x86_64 ;; + manylinux_2_28_i686) QEMU_ARCH="i386"; BASE_IMAGE="i386/$BASE_IMAGE32"; DOCKER_PLATFORM="linux/i386"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; + manylinux_2_28_armv7l) QEMU_ARCH="arm"; BASE_IMAGE="arm32v7/$BASE_IMAGE32"; DOCKER_PLATFORM="linux/arm/v7"; PYLON_ARCH=armhf CMD_WRAPPER=linux32 ;; + manylinux_2_31_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="arm64v8/$BASE_IMAGE64"; DOCKER_PLATFORM="linux/arm64"; PYLON_ARCH=aarch64 ;; + manylinux2014_x86_64) QEMU_ARCH="x86_64"; BASE_IMAGE="quay.io/pypa/manylinux2014_x86_64"; DOCKER_PLATFORM="linux/amd64"; PYLON_ARCH=x86_64 ;; + manylinux2014_i686) QEMU_ARCH="i386"; BASE_IMAGE="quay.io/pypa/manylinux2014_i686"; DOCKER_PLATFORM="linux/i386"; PYLON_ARCH=x86 ; CMD_WRAPPER=linux32 ;; + manylinux2014_aarch64) QEMU_ARCH="aarch64"; BASE_IMAGE="quay.io/pypa/manylinux2014_aarch64"; DOCKER_PLATFORM="linux/arm64"; PYLON_ARCH=aarch64 ;; *) echo "Unsupported platform tag '$PLATFORM_TAG'. Supported platforms: linux_x86_64, linux_i686, linux_armv7l, linux_aarch64, manylinux2014_x86_64, manylinux2014_i686, manylinux2014_aarch64, manylinux_2_28_, manylinux_2_31_" exit 1 @@ -119,10 +119,11 @@ fi DOCKER_TAG="pypylon-$PLATFORM_TAG-$(date +%s)" docker build --network host \ - --build-arg "QEMU_TARGET_ARCH=$QEMU_ARCH" \ - --build-arg "DOCKER_BASE_IMAGE=$BASE_IMAGE" \ - --build-arg "CMD_WRAPPER=$CMD_WRAPPER" \ - --tag "$DOCKER_TAG" - < $THISDIR/Dockerfile.$BUILD_DISTRO + --platform "$DOCKER_PLATFORM" \ + --build-arg "QEMU_TARGET_ARCH=$QEMU_ARCH" \ + --build-arg "DOCKER_BASE_IMAGE=$BASE_IMAGE" \ + --build-arg "CMD_WRAPPER=$CMD_WRAPPER" \ + --tag "$DOCKER_TAG" - < $THISDIR/Dockerfile.$BUILD_DISTRO #make path absolute