Bug#930684: [Patch] Make /proc won't be unmounted in docker instance
Dear maintainer,
Attached please find the patch file to address this bug.
In /usr/share/debootstrap/scripts/debian-common,
The function first_stage_install () {
...
if doing_variant fakechroot || [ "$CONTAINER" = "docker" ]; then
setup_proc_symlink
fi
which will make the chroot's /proc in docker instance link the host's /proc.
Hence in the function "setup_proc" in /usr/share/debootstrap/functions,
this line:
umount "$TARGET/proc" 2>/dev/null || true
will unmount the docker instance's /proc, and it causes this issue.
I believe you definitely have a better solution for this, but the patch
for debootstrap 1.0.120 works for me.
My 2 cents.
Steven
--
Steven Shiau <steven _at_ stevenshiau org>
Public Key Server PGP Key ID: 4096R/163E3FB0
Fingerprint: EB1D D5BF 6F88 820B BCF5 356C 8E94 C9CD 163E 3FB0
--- functions.orig 2020-03-08 21:41:03.000000000 +0800
+++ functions 2020-03-08 21:41:33.000000000 +0800
@@ -1199,7 +1199,9 @@
umount_on_exit /dev/shm
umount_on_exit /proc
umount_on_exit /proc/bus/usb
- umount "$TARGET/proc" 2>/dev/null || true
+ if [ ! -h "$TARGET/proc" ]; then
+ umount "$TARGET/proc" 2>/dev/null || true
+ fi
# some container environment are used at second-stage, it already treats /proc and so on
if [ -z "$(ls -A "$TARGET/proc")" ]; then
Reply to: