There is support for running subprocesses within nsjail.
This is controlled by the SANDBOX settings, and is disabled by default in the development .env but is enabled inside the backend Docker container.
To enable it locally outside of the Docker container:
-
Build or install
nsjaillocally. Example instructions for Ubuntu:apt-get install autoconf bison flex gcc g++ git libprotobuf-dev libnl-route-3-dev libtool make pkg-config protobuf-compilergit clone --recursive --branch=3.0 https://github.com/google/nsjailcd nsjail && make
-
Enable
unprivileged_userns_clone- Temporary:
sudo sysctl -w kernel.unprivileged_userns_clone=1 - Permanent:
echo 'kernel.unprivileged_userns_clone=1' | sudo tee -a /etc/sysctl.d/00-local-userns.conf && sudo service procps restart
- Temporary:
-
Edit
.env.local:- Set
USE_SANDBOX_JAIL=on - Set
SANDBOX_NSJAIL_BIN_PATHto the absolute path of thensjailbinary built above
- Set