summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-02 10:57:24 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-02 18:15:37 +0200
commit1ccc0f807d3f22fa9ade1c607c112e04df833a72 (patch)
tree4b63fa9c0aa1b658b126ff14858f4be6f21f8503 /doc
parentaf76c020bf19de5fe2e92f31d8b85cbd55c481de (diff)
environment: '-C' creates namespaces where the user is not root.
* guix/scripts/environment.scm (launch-environment/container): Add UID and GID. Use them in PASSWD and GROUPS. Pass them as #:guest-uid and #:guest-gid to 'call-with-container'. * tests/guix-environment-container.sh: Test the inner UID. In '--user' test, replace hard-coded 0 with 1000. * doc/guix.texi (Invoking guix environment): Adjust accordingly.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi13
1 files changed, 8 insertions, 5 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 616970b5052..616c2ef3053 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -4557,9 +4557,11 @@ Run @var{command} within an isolated container. The current working
4557directory outside the container is mapped inside the container. 4557directory outside the container is mapped inside the container.
4558Additionally, unless overridden with @code{--user}, a dummy home 4558Additionally, unless overridden with @code{--user}, a dummy home
4559directory is created that matches the current user's home directory, and 4559directory is created that matches the current user's home directory, and
4560@file{/etc/passwd} is configured accordingly. The spawned process runs 4560@file{/etc/passwd} is configured accordingly.
4561as the current user outside the container, but has root privileges in 4561
4562the context of the container. 4562The spawned process runs as the current user outside the container. Inside
4563the container, it has the same UID and GID as the current user, unless
4564@option{--user} is passed (see below.)
4563 4565
4564@item --network 4566@item --network
4565@itemx -N 4567@itemx -N
@@ -4587,8 +4589,9 @@ the environment.
4587@itemx -u @var{user} 4589@itemx -u @var{user}
4588For containers, use the username @var{user} in place of the current 4590For containers, use the username @var{user} in place of the current
4589user. The generated @file{/etc/passwd} entry within the container will 4591user. The generated @file{/etc/passwd} entry within the container will
4590contain the name @var{user}; the home directory will be 4592contain the name @var{user}, the home directory will be
4591@file{/home/USER}; and no user GECOS data will be copied. @var{user} 4593@file{/home/@var{user}}, and no user GECOS data will be copied. Furthermore,
4594the UID and GID inside the container are 1000. @var{user}
4592need not exist on the system. 4595need not exist on the system.
4593 4596
4594Additionally, any shared or exposed path (see @code{--share} and 4597Additionally, any shared or exposed path (see @code{--share} and