linux-container: Do not jail the container unconditionally.

We may want to run a container inside the MNT namespace, without jailing the
container. If RUN-CONTAINER is passed a null MOUNTS list, do not jail the
container.

* gnu/build/linux-container.scm (run-container): Do not call
MOUNT-FILE-SYSTEMS if MOUNTS list is empty.
This commit is contained in:
Mathieu Othacehe 2020-08-13 13:59:19 +02:00
parent 22827396ba
commit 5316dfc0f1
No known key found for this signature in database
GPG Key ID: 8354763531769CA6

@ -243,7 +243,8 @@ that host UIDs (respectively GIDs) map to in the namespace."
(match (read child)
('ready
(purify-environment)
(when (memq 'mnt namespaces)
(when (and (not (null? mounts))
(memq 'mnt namespaces))
(catch #t
(lambda ()
(mount-file-systems root mounts