Skip to content

Commit

Permalink
Fixed build problems of docker containers on GitHub agents.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernrennfanz committed Jul 2, 2024
1 parent ec5fd49 commit 75a6312
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions scripts/build/build-arch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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_<arch>, manylinux_2_31_<arch>"
exit 1
Expand All @@ -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
Expand Down

0 comments on commit 75a6312

Please sign in to comment.