diff options
| author | Serge Schneider <serge@raspberrypi.com> | 2020-10-14 14:51:20 +0100 |
|---|---|---|
| committer | Serge Schneider <serge@raspberrypi.com> | 2020-10-14 14:51:20 +0100 |
| commit | ec4562c7f23ccca4fbb2ca5e750568224fe431d8 (patch) | |
| tree | 63e437018d7eef994c0df2ea84150d0ffcd2c990 | |
| parent | 8808124cc319932f5fff4d8c5b78a9b6de95d642 (diff) | |
| parent | dd96ca1c8629da6589b381546e2b7677c7611744 (diff) | |
Merge remote-tracking branch 'upstream/master' into arm64
| -rw-r--r-- | Dockerfile | 3 | ||||
| -rwxr-xr-x | build-docker.sh | 12 |
2 files changed, 13 insertions, 2 deletions
@@ -1,4 +1,5 @@ -FROM debian:buster +ARG BASE_IMAGE=debian:buster +FROM ${BASE_IMAGE} ENV DEBIAN_FRONTEND noninteractive diff --git a/build-docker.sh b/build-docker.sh index b6a9ea3..350f722 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -73,7 +73,17 @@ fi # Modify original build-options to allow config file to be mounted in the docker container BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" -${DOCKER} build -t pi-gen "${DIR}" +# Check the arch of the machine we're running on. If it's 64-bit, use a 32-bit base image instead +case "$(uname -m)" in + x86_64|aarch64) + BASE_IMAGE=i386/debian:buster + ;; + *) + BASE_IMAGE=debian:buster + ;; +esac +${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}" + if [ "${CONTAINER_EXISTS}" != "" ]; then trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM time ${DOCKER} run --rm --privileged \ |
