File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ BUILD_ARCH=$( echo " ${DOCKERFILE_PATH} " | cut -d ' .' -f 3)
4
+
5
+ if [ -z " $BUILD_ARCH " ] || [ " $BUILD_ARCH " == " amd64" ]; then
6
+ echo ' qemu-user-static: Registration not required for current arch' ;
7
+ exit 0
8
+ fi
9
+
10
+ #
11
+ # DockerHub multiarch hack
12
+ # @see https://stackoverflow.com/questions/54578066/how-to-build-a-docker-image-on-a-specific-architecture-with-docker-hub
13
+ # @see https://stackoverflow.com/questions/55818831/dockerhub-automated-build-for-arm-arm64-permission-denied
14
+ # @see https://stackoverflow.com/questions/44925788/dockerfile-compile-in-local-machine-but-fails-in-docker-hub-for-automated-build
15
+ # @see https://github.com/cmosh/alpine-arm
16
+ # @see https://github.com/balena-io-library/armv7hf-debian-qemu/tree/master/bin
17
+ # @see https://wiki.debian.org/RaspberryPi/qemu-user-static
18
+ # @see https://github.com/multiarch/qemu-user-static
19
+ # @see https://aquarat.co.za/tag/dockerhub/
20
+ #
21
+ docker run --rm --privileged multiarch/qemu-user-static:register --reset
You can’t perform that action at this time.
0 commit comments