Subprocess launched inside a chroot created on a codespace with debootstrap fail with /dev/fd/62: No such file or directory
1
vote
1
answer
210
views
My goal is to standup a chroot with the basic Unix tool-set (
bash
, cp
, touch
, cat
, etc) and any necessary dependencies need to run apt get
inside a codespace. Using debootstrap gets me close. The basic tools are installed and I can run apt get
. The problem is subprocess do not work. I expect the last line to print "test" but actually I get an error saying that the subprocess' file handle is no good. I would have thought the vanilla debootstrap environment would be sufficiently cooked so that subprocess work, but that does not seem to be the case. Is there a switch I can pass?
$ sudo apt-get install -y binutils debootstrap
$ cd /home/codespace
$ CHROOT=/home/codespace/chroot
$ mkdir -p "${CHROOT}"
$ sudo debootstrap stable "${CHROOT}" http://deb.debian.org/debian/
$ sudo chroot "${CHROOT}"
$ cat < <(echo test)
bash: /dev/fd/63: No such file or directory
To reproduce,
- sign up for codespaces beta [here](https://github.com/features/codespaces/signup) .
- fire up a codespace for [this project](https://github.com/kingces95/chroot-mounts) , open a bash shell (ctrl+`).
- run the above.
This also reproduces outside of codespace so any Ubuntu environment will probably yield similar results.
Asked by Christopher King
(252 rep)
Jun 30, 2022, 02:21 AM
Last activity: Jul 1, 2022, 11:52 PM
Last activity: Jul 1, 2022, 11:52 PM