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
This commit is contained in:
simonliedl 2022-01-19 16:16:51 +01:00 committed by XECDesign
parent f01430c9d8
commit 0b4874f75a
2 changed files with 5 additions and 1 deletions

View file

@ -8,7 +8,7 @@ RUN apt-get -y update && \
git vim parted \ git vim parted \
quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \ quilt coreutils qemu-user-static debootstrap zerofree zip dosfstools \
libarchive-tools libcap2-bin rsync grep udev xz-utils curl xxd file kmod bc\ 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/* && rm -rf /var/lib/apt/lists/*
COPY . /pi-gen/ COPY . /pi-gen/

View file

@ -98,6 +98,8 @@ if [ "${CONTAINER_EXISTS}" != "" ]; then
--volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \ --volumes-from="${CONTAINER_NAME}" --name "${CONTAINER_NAME}_cont" \
pi-gen \ pi-gen \
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && 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} && cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/" & rsync -av work/*/build.log deploy/" &
wait "$!" wait "$!"
@ -112,6 +114,8 @@ else
-e "GIT_HASH=${GIT_HASH}" \ -e "GIT_HASH=${GIT_HASH}" \
pi-gen \ pi-gen \
bash -e -o pipefail -c "dpkg-reconfigure qemu-user-static && 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} && cd /pi-gen; ./build.sh ${BUILD_OPTS} &&
rsync -av work/*/build.log deploy/" & rsync -av work/*/build.log deploy/" &
wait "$!" wait "$!"