diff options
| author | 2019-07-07 00:15:13 +0200 | |
|---|---|---|
| committer | 2019-07-07 00:15:13 +0200 | |
| commit | dcb090dcd779581c1eddb20b4860848b02139145 (patch) | |
| tree | 5c8f43f96f258a548246aef8d9683a3c6a880615 /Docker/hooks | |
| parent | 68cc039bc76dad419fda0c7e37f7da3980ada881 (diff) | |
Docker build for ARM (Raspberry Pi) (#2436)
* Docker build for ARM (Raspberry Pi)
Inspired by https://github.com/stas-demydiuk/domoticz-docker
* Execution rights
* Readme typo
* Move QEMU higher up
* Change tar command
* Try to fix COPY error
* Fix path bug
Diffstat (limited to 'Docker/hooks')
| -rwxr-xr-x | Docker/hooks/pre_build | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Docker/hooks/pre_build b/Docker/hooks/pre_build new file mode 100755 index 000000000..f6c8211c0 --- /dev/null +++ b/Docker/hooks/pre_build @@ -0,0 +1,12 @@ +#!/bin/bash + +if [[ "$DOCKERFILE_PATH" == *-ARM ]]; +then + # https://github.com/balena-io/qemu + # Download a local copy of QEMU on Docker Hub build machine + curl -LSs 'https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz' | tar -xzv --strip-components=1 --wildcards '*/qemu-*' + + # https://github.com/multiarch/qemu-user-static + # 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 +fi |
