From 5088ce02912388d8d2d06c80f8d5f5da5fca762d Mon Sep 17 00:00:00 2001 From: Isaac Abadi Date: Sat, 8 Aug 2020 16:02:41 -0400 Subject: [PATCH] Potentially fixed autobuild issue for ARM images --- backend/Dockerfile-armhf | 2 ++ hooks/post_checkout | 3 +++ hooks/pre_build | 4 ++++ 3 files changed, 9 insertions(+) create mode 100644 hooks/post_checkout create mode 100644 hooks/pre_build diff --git a/backend/Dockerfile-armhf b/backend/Dockerfile-armhf index c66f095..e1826bb 100644 --- a/backend/Dockerfile-armhf +++ b/backend/Dockerfile-armhf @@ -1,5 +1,7 @@ FROM arm32v7/alpine:3.12 +COPY qemu-arm-static /usr/bin + ENV UID=1000 \ GID=1000 \ USER=youtube diff --git a/hooks/post_checkout b/hooks/post_checkout new file mode 100644 index 0000000..326c943 --- /dev/null +++ b/hooks/post_checkout @@ -0,0 +1,3 @@ +#!/bin/bash +# downloads a local copy of qemu on docker-hub build machines +curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static . \ No newline at end of file diff --git a/hooks/pre_build b/hooks/pre_build new file mode 100644 index 0000000..076769d --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,4 @@ +#!/bin/bash +# Register qemu-*-static for all supported processors except the +# current one, but also remove all registered binfmt_misc before +docker run --rm --privileged multiarch/qemu-user-static:register --reset \ No newline at end of file