mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-09 10:45:54 +02:00
linux-container: Add #:child-is-pid1? to ‘eval/container’.
* gnu/system/linux-container.scm (eval/container): Add `#:child-is-pid1?`. Change-Id: I522783f22a38093d862f5cfad1c68baaacd4ecc5 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
committed by
Ludovic Courtès
parent
8538333bed
commit
2ca5575e9d
@@ -356,13 +356,18 @@ Run the container with the given options."))
|
||||
(mappings '())
|
||||
(mounts '())
|
||||
(namespaces %namespaces)
|
||||
(guest-uid 0) (guest-gid 0))
|
||||
(guest-uid 0) (guest-gid 0)
|
||||
(child-is-pid1? #t))
|
||||
"Evaluate EXP, a gexp, in a new process executing in separate namespaces as
|
||||
listed in NAMESPACES. Add MOUNTS, a list of <file-system>, and MAPPINGS, a
|
||||
list of <file-system-mapping>, to the set of directories visible in the
|
||||
process's mount namespace. Inside the namespaces, run code as GUEST-UID and
|
||||
GUEST-GID. Return the process' exit status as a monadic value.
|
||||
|
||||
When CHILD-IS-PID1? is true, and if NAMESPACES contains 'pid', then the child
|
||||
process runs directly as PID 1. See the documentation for
|
||||
`(@@ (gnu build linux-container) call-with-container)` for further details.
|
||||
|
||||
This is useful to implement processes that, unlike derivations, are not
|
||||
entirely pure and need to access the outside world or to perform side
|
||||
effects."
|
||||
@@ -406,4 +411,5 @@ effects."
|
||||
#:populate-file-system populate-file-system
|
||||
#:namespaces namespaces
|
||||
#:guest-uid guest-uid
|
||||
#:guest-gid guest-gid))))))
|
||||
#:guest-gid guest-gid
|
||||
#:child-is-pid1? child-is-pid1?))))))
|
||||
|
||||
Reference in New Issue
Block a user