mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-01 20:42:11 +00:00
setup multiarch builder
This commit is contained in:
parent
8a59696a5c
commit
8fd23d7796
2 changed files with 4 additions and 5 deletions
|
@ -132,7 +132,7 @@ fi
|
||||||
|
|
||||||
# Ensure QEMU is set up for cross-platform builds
|
# Ensure QEMU is set up for cross-platform builds
|
||||||
echo -n "Ensuring QEMU is configured for cross-platform builds..."
|
echo -n "Ensuring QEMU is configured for cross-platform builds..."
|
||||||
if docker run --rm --privileged multiarch/qemu-user-static --reset -p yes > /dev/null 2>&1; then
|
if docker run --rm --privileged tonistiigi/binfmt --install all > /dev/null 2>&1; then
|
||||||
echo -e " [${GREEN}OK${NC}]"
|
echo -e " [${GREEN}OK${NC}]"
|
||||||
else
|
else
|
||||||
echo -e " [${RED}FAIL${NC}]"
|
echo -e " [${RED}FAIL${NC}]"
|
||||||
|
|
|
@ -19,8 +19,7 @@ fi
|
||||||
if [ "$1" != "-y" ]; then
|
if [ "$1" != "-y" ]; then
|
||||||
echo "### Setting up Docker for Multi-Arch Builds."
|
echo "### Setting up Docker for Multi-Arch Builds."
|
||||||
echo "### Requires Docker packages from https://get.docker.com/"
|
echo "### Requires Docker packages from https://get.docker.com/"
|
||||||
echo "### Use on x64 only!"
|
echo "### Run with -y if you meet the requirements!"
|
||||||
echo "### Run with -y if you fit the requirements!"
|
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -42,7 +41,7 @@ fi
|
||||||
|
|
||||||
# Ensure QEMU is set up for cross-platform builds
|
# Ensure QEMU is set up for cross-platform builds
|
||||||
echo -n "Ensuring QEMU is configured for cross-platform builds..."
|
echo -n "Ensuring QEMU is configured for cross-platform builds..."
|
||||||
if docker run --rm --privileged multiarch/qemu-user-static --reset -p yes >/dev/null 2>&1; then
|
if docker run --rm --privileged tonistiigi/binfmt --install all >/dev/null 2>&1; then
|
||||||
echo -e " [${GREEN}OK${NC}]"
|
echo -e " [${GREEN}OK${NC}]"
|
||||||
else
|
else
|
||||||
echo -e " [${RED}FAIL${NC}]"
|
echo -e " [${RED}FAIL${NC}]"
|
||||||
|
@ -95,5 +94,5 @@ echo " docker login -u <username>"
|
||||||
echo " docker login ghcr.io -u <username>"
|
echo " docker login ghcr.io -u <username>"
|
||||||
echo
|
echo
|
||||||
echo -e "${BLUE}Fix segmentation faults when building arm64 images:${NC}"
|
echo -e "${BLUE}Fix segmentation faults when building arm64 images:${NC}"
|
||||||
echo " docker run --rm --privileged multiarch/qemu-user-static --reset -p yes"
|
echo " docker buildx rm mybuilder && docker run --rm --privileged tonistiigi/binfmt --install all"
|
||||||
echo
|
echo
|
||||||
|
|
Loading…
Reference in a new issue