aboutsummaryrefslogtreecommitdiff
path: root/extras
diff options
context:
space:
mode:
authorMarco Poletti <poletti.marco@gmail.com>2019-08-31 16:03:36 -0700
committerMarco Poletti <poletti.marco@gmail.com>2019-08-31 16:03:36 -0700
commit583444ee3568a3c631a6f273d76f5035eb1c3cb5 (patch)
tree5b28797125392707444bdacfe877d8e5844687a5 /extras
parent7983b2d30b53147330bf961e225ec570de22f236 (diff)
downloadgoogle-fruit-583444ee3568a3c631a6f273d76f5035eb1c3cb5.tar.gz
Add a script to rebuild/reupload docker images.
Diffstat (limited to 'extras')
-rwxr-xr-xextras/dockerfiles/rebuild_all.sh38
1 files changed, 38 insertions, 0 deletions
diff --git a/extras/dockerfiles/rebuild_all.sh b/extras/dockerfiles/rebuild_all.sh
new file mode 100755
index 0000000..545df07
--- /dev/null
+++ b/extras/dockerfiles/rebuild_all.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+cd extras/dockerfiles/ || exit 1
+
+# Setup for ARM
+docker run --rm --privileged multiarch/qemu-user-static:register --reset
+
+COMMANDS=()
+
+for V in 16.04 17.04 18.04 18.10 19.04 16.04
+do
+ C="docker build -t polettimarco/fruit-basesystem:ubuntu-$V -f Dockerfile.ubuntu-$V ."
+ COMMANDS+=("$C || { echo; echo FAILED: '$C'; echo; exit 1; }")
+done
+
+for V in 16.04 18.04
+do
+ C="docker build -t polettimarco/fruit-basesystem:ubuntu_arm-$V -f Dockerfile.ubuntu_arm-$V ."
+ COMMANDS+=("$C || { echo; echo FAILED: '$C'; echo; exit 1; }")
+done
+
+for C in "${COMMANDS[@]}"
+do
+ echo "$C"
+done | xargs -P 0 -L 1 -d '\n' bash -c || {
+
+ # The successful ones should all be no-ops at this point, the failing ones won't be.
+ # This way we get better diagnostics.
+ for C in "${COMMANDS[@]}"
+ do
+ $C || {
+ echo "Failed: $C"
+ exit 1
+ }
+ done
+}
+
+docker push polettimarco/fruit-basesystem