I am trying to use chroots under lxc for development. I have enabled the "nesting" option in the lxc container configuration and bound mounted proc and devpts into my chroot as I would if the chroots were on a normal Linux box.
Unfortunately when I try and use stuff in the chroot that needs ptys (for example the "script" command) I get errors like
root@manualdev:~# chroot /chroots/jessie-staging/
root@manualdev:/# script
script: openpty failed: No such file or directory
Terminated
root@manualdev:/#
System information:
- Host kernel is 4.4.0-79-generic
 - Host distro is Ubuntu xenial
 - Host architecture is arm64
 - Container distro is Debian stretch
 - Container and chroot architecture is armhf
 - Chroot distro is Raspbian (tested with jessie, stretch and buster)