1#!/bin/bash 2 3cd extras/dockerfiles/ || exit 1 4 5# Setup for ARM 6docker run --rm --privileged multiarch/qemu-user-static:register --reset 7 8COMMANDS=() 9 10for V in 18.04 19.10 20.04 20.10 11do 12 C="docker build --squash -t polettimarco/fruit-basesystem:ubuntu-$V -f Dockerfile.ubuntu-$V ." 13 COMMANDS+=("$C || { echo; echo FAILED: '$C'; echo; exit 1; }") 14done 15 16for V in 18.04 20.04 17do 18 C="docker build --squash -t polettimarco/fruit-basesystem:ubuntu_arm-$V -f Dockerfile.ubuntu_arm-$V ." 19 COMMANDS+=("$C || { echo; echo FAILED: '$C'; echo; exit 1; }") 20done 21 22for C in "${COMMANDS[@]}" 23do 24 echo "$C" 25done | xargs -P 0 -L 1 -d '\n' bash -c || { 26 27 # The successful ones should all be no-ops at this point, the failing ones won't be. 28 # This way we get better diagnostics. 29 for C in "${COMMANDS[@]}" 30 do 31 bash -c "$C" || exit 1 32 done 33} 34 35docker push polettimarco/fruit-basesystem 36