[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#921815: debootstrap umount "host" /proc when running in a Docker container



control: tags -1 -moreinfo

Hi
Sorry for the late response. I wasn't subscribed to the bug (I assume?).

On 23.02.2020 14.01, Hideki Yamane wrote:
When running debootstrap inside a Docker container, debootstrap umount both /proc and $TARGET/proc.
  How do I check it?

  - run docker
  - get debootstrap 1.0.110 and install it
  - debootstrap sid sid
  - /proc is there inside docker as below

Did you use a privileged container? /proc can't be unmounted in a regular non-privileged container.

I just tried and "/proc" is unmounted:
$ docker run --privileged --rm -t -i debian:stretch-backports bash
$ apt-get update && apt-get install -y -t stretch-backports debootstrap
$ debootstrap stretch chroot
$ ls /proc # it is empty

I also tried the debootstrap version in sid:
$ docker run --privileged --rm -t -i debian:sid bash
$ apt-get update && apt-get install -y debootstrap
$ debootstrap sid chroot
$ ls /proc # it is empty

Also please see the MRs:
https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/26
https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/27
https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/30

I'm not sure which approach is the best, but Eicke did a short analysis:
https://salsa.debian.org/installer-team/debootstrap/-/merge_requests/26#note_171042

root@b49ab8b7f3eb:~# ls /proc/
1          crypto       iomem        kpageflags    partitions   sysrq-trigger
19486      devices      ioports      loadavg       pressure     sysvipc
acpi       diskstats    irq          locks         sched_debug  thread-self
asound     dma          kallsyms     meminfo       schedstat    timer_list
buddyinfo  driver       kcore        misc          self         tty
bus        execdomains  key-users    modules       slabinfo     uptime
cgroups    fb           keys         mounts        softirqs     version
cmdline    filesystems  kmsg         mtrr          stat         vmallocinfo
consoles   fs           kpagecgroup  net           swaps        vmstat
cpuinfo    interrupts   kpagecount   pagetypeinfo  sys          zoneinfo

---

- Kristian Klausen


Reply to: