From 6ddd74aa02073fcd0805ac05f981fe6292868b48 Mon Sep 17 00:00:00 2001 From: Ani Date: Tue, 6 Oct 2020 02:58:18 -0700 Subject: [PATCH] Automagically use i386/debian:buster (#415) * Autmagically use 1386/debian:buster when running on 64-bit host to prevent error #271 (cherry picked from commit dd96ca1c8629da6589b381546e2b7677c7611744) --- Dockerfile | 3 ++- build-docker.sh | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9dc2d59dce..9088451a28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,5 @@ -FROM i386/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 a7f18f136f..a3c9083c7a 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -78,10 +78,10 @@ BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')" # 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:bullseye + BASE_IMAGE=i386/debian:buster ;; *) - BASE_IMAGE=debian:bullseye + BASE_IMAGE=debian:buster ;; esac ${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"