From e7e8a21e81a82edc6bff92c86dc223c936dc4aa5 Mon Sep 17 00:00:00 2001 From: Charles Short Date: Wed, 13 Oct 2021 11:41:16 -0400 Subject: [PATCH] Prevent debootstrap from umounting /proc While running sbuild-createchroot, debootstrap would umount the instance's /proc when the instance is called with "--privileged" option. This is reported in Debian's bug tracker as: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968927 To workaround this, we download the debootstrap from Debian Experimental which contains this fix and install it via dpkg when the container is built. Tested locally by building the container and creating an sbuild environment. Story: 2008846 Task: 43625 Signed-off-by: Charles Short Change-Id: I6133dc402995b285614b8520d81ae1c2108f295c --- stx/dockerfiles/stx-pkgbuilder.Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/stx/dockerfiles/stx-pkgbuilder.Dockerfile b/stx/dockerfiles/stx-pkgbuilder.Dockerfile index 92c9d635..71fadee9 100644 --- a/stx/dockerfiles/stx-pkgbuilder.Dockerfile +++ b/stx/dockerfiles/stx-pkgbuilder.Dockerfile @@ -43,6 +43,13 @@ RUN apt-get update && apt-get install --no-install-recommends -y \ pip3 install Flask && \ sudo sbuild-adduser root +# workaround for docker debootstrap bug +# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968927 +RUN cd /tmp && \ + wget \ + http://ftp.debian.org/debian/pool/main/d/debootstrap/debootstrap_1.0.124_all.deb && \ + dpkg -i debootstrap_1.0.124_all.deb + COPY stx/toCOPY/pkgbuilder/app.py /opt/ COPY stx/toCOPY/pkgbuilder/debbuilder.py /opt/ COPY stx/toCOPY/pkgbuilder/debbuilder.conf /etc/sbuild/sbuild.conf