From 199b74a1449ff6e5a549e2b5e51ce51bd8c69ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bondis?= Date: Sun, 31 Mar 2019 23:47:39 -0400 Subject: [PATCH] update comments, add helper script to push local build to rpi --- tests/build_arm.sh | 6 ++++++ tests/deploy_to_pi.sh | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100755 tests/deploy_to_pi.sh diff --git a/tests/build_arm.sh b/tests/build_arm.sh index 41b338d0..280de51f 100755 --- a/tests/build_arm.sh +++ b/tests/build_arm.sh @@ -2,10 +2,16 @@ ALPINE_VER="3.8" DISTRO="balenalib/rpi-alpine:$ALPINE_VER" +# Used for Radicale EDGE_DISTRO="balenalib/rpi-alpine:edge" +# Used for webmails PHP="arm32v7/php:7.2-apache" + +# NOTE: Might not be needed since using multiarch/qemu QEMU="$(which qemu-arm-static)" cp $QEMU ../webmails/rainloop/ cp $QEMU ../webmails/roundcube/ +# use qemu-*-static from docker container +docker run --rm --privileged multiarch/qemu-user-static:register docker-compose -f build.yml build --build-arg DISTRO=$DISTRO --build-arg PHP_DISTRO=$PHP --build-arg EDGE_DISTRO=$EDGE_DISTRO --parallel $@ diff --git a/tests/deploy_to_pi.sh b/tests/deploy_to_pi.sh new file mode 100755 index 00000000..dab5a53f --- /dev/null +++ b/tests/deploy_to_pi.sh @@ -0,0 +1,6 @@ +#!/bin/bash -x +# Small script to deploy locally built images to a remote docker +compose_options=$1 +images=$(docker-compose $1 images | awk 'NR > 2 { printf $2":"$3" " }') +docker save $images | pigz - > mail.local.tgz +echo "now run 'docker -H \"ssh://user@host\" load -i mail.local.tgz"