From 0b4874f75ae0a7907b334358403c87fd5750fe54 Mon Sep 17 00:00:00 2001 From: simonliedl Date: Wed, 19 Jan 2022 16:16:51 +0100 Subject: [PATCH] Fix docker build with debian bullseye image - Fix missing sfdisk which is not included anymore in bullseye container - Fix problem with binfmt_misc not being mounted inside docker although present on host --- Dockerfile | 2 +- build-docker.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e7fc561..479e708 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,7 +8,7 @@ RUN apt-get -y update && \ git vim parted \ quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\ - binfmt-support ca-certificates qemu-utils kpartx \ + binfmt-support ca-certificates qemu-utils kpartx fdisk \ && rm -rf /var/lib/apt/lists/* COPY . /pi-gen/ diff --git a/build-docker.sh b/build-docker.sh index 85200e4..2dc55c1 100755 --- a/build-docker.sh +++ b/build-docker.sh @@ -98,6 +98,8 @@ if [ "${CONTAINER_EXISTS}" != "" ]; then --volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \ pi-gen \ bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && + # binfmt_misc is sometimes not mounted with debian bullseye image + (mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) && cd /pi-gen; ./build.sh ${BUILD_OPTS} && rsync -av work/*/build.log deploy/" & wait "$!" @@ -112,6 +114,8 @@ else -e "GIT_HASH=${GIT_HASH}" \ pi-gen \ bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && + # binfmt_misc is sometimes not mounted with debian bullseye image + (mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc || true) && cd /pi-gen; ./build.sh ${BUILD_OPTS} && rsync -av work/*/build.log deploy/" & wait "$!"