pre_build 590 B

1234567891011121314
  1. #!/bin/bash
  2. cp README.md ../
  3. if [[ "$DOCKERFILE_PATH" == *-ARM ]]
  4. then
  5. # https://github.com/balena-io/qemu
  6. # Download a local copy of QEMU on Docker Hub build machine
  7. 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-*'
  8. # https://github.com/multiarch/qemu-user-static
  9. # Register qemu-*-static for all supported processors except the current one, but also remove all registered binfmt_misc before
  10. docker run --rm --privileged multiarch/qemu-user-static:register --reset
  11. fi