* Adding release script for multiarch Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Comment on buildx Signed-off-by: Harsh Thakur <harshthakur9030@gmail.com> * Remove need of triggering buildx script explicitly in build Signed-off-by: Sanket Sudake <sanketsudake@gmail.com> Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
27 lines
723 B
Bash
Executable File
27 lines
723 B
Bash
Executable File
set -e
|
|
## This script needs to be run to start the emulator for multiarch builds
|
|
create_docker_builder() {
|
|
if ! $(docker buildx inspect --bootstrap | grep "^Driver" | grep -q "docker-container"); then
|
|
echo "Starting docker builder fission"
|
|
docker buildx create --name=fission --use --driver=docker-container
|
|
docker buildx inspect --bootstrap
|
|
fi
|
|
}
|
|
|
|
check_platform() {
|
|
if ! $(docker buildx inspect --bootstrap | grep "^Platforms:" | grep -q "$1"); then
|
|
echo "Platform $1 not supported by builder"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
create_docker_builder
|
|
PLATFORMS=(
|
|
linux/amd64
|
|
linux/arm6455
|
|
linux/arm/v7
|
|
)
|
|
for platform in "${PLATFORMS[@]}"; do
|
|
check_platform $platform
|
|
done
|