-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpre_build
23 lines (16 loc) · 844 Bytes
/
pre_build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
# Register qemu-*-static for all supported processors except the
# current one, but also remove all registered binfmt_misc before
#!/bin/bash
# BUILD_ARCH=$(echo "${DOCKERFILE_PATH}" | cut -d '.' -f 2)
# [ "${BUILD_ARCH}" == "Dockerfile" ] && { echo 'qemu-user-static: Registration not required for current arch'; exit 0; }
# if [ "${BUILD_ARCH}" == "arm64v8" ]; then
# echo 'arm64'
# QEMU_USER_STATIC_ARCH=$([ "${BUILD_ARCH}" == "arm64v8" ] && echo "arm64" || echo "${BUILD_ARCH}")
# else
# QEMU_USER_STATIC_ARCH=$([ "${BUILD_ARCH}" == "arm32v7" ] && echo "armhf" || echo "${BUILD_ARCH}")
# echo 'arm'
# fi
docker run --rm --privileged multiarch/qemu-user-static:register --reset
#docker run --rm multiarch/alpine:armhf-edge uname -a
#docker run --rm --privileged multiarch/qemu-user-static:register --reset