Autmagically use 1386/debian:buster when running on 64-bit host to prevent error #271
This commit is contained in:
parent
08fc0b9a82
commit
6ef7fa5d57
|
@ -1,4 +1,5 @@
|
||||||
FROM debian:buster
|
ARG BASE_IMAGE=debian:buster
|
||||||
|
FROM ${BASE_IMAGE}
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,10 @@ fi
|
||||||
# Modify original build-options to allow config file to be mounted in the docker container
|
# 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@')"
|
BUILD_OPTS="$(echo "${BUILD_OPTS:-}" | sed -E 's@\-c\s?([^ ]+)@-c /config@')"
|
||||||
|
|
||||||
${DOCKER} build -t pi-gen "${DIR}"
|
ARCH=$(uname -m)
|
||||||
|
[[ $ARCH == "x86_64" || $ARCH == "aarch64" ]] && BASE_IMAGE=i386/debian:buster || BASE_IMAGE=debian:buster
|
||||||
|
${DOCKER} build --build-arg BASE_IMAGE=${BASE_IMAGE} -t pi-gen "${DIR}"
|
||||||
|
|
||||||
if [ "${CONTAINER_EXISTS}" != "" ]; then
|
if [ "${CONTAINER_EXISTS}" != "" ]; then
|
||||||
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM
|
trap 'echo "got CTRL+C... please wait 5s" && ${DOCKER} stop -t 5 ${CONTAINER_NAME}_cont' SIGINT SIGTERM
|
||||||
time ${DOCKER} run --rm --privileged \
|
time ${DOCKER} run --rm --privileged \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user