diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2019-04-02 10:57:24 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2019-04-02 18:15:37 +0200 |
| commit | 1ccc0f807d3f22fa9ade1c607c112e04df833a72 (patch) | |
| tree | 4b63fa9c0aa1b658b126ff14858f4be6f21f8503 /doc | |
| parent | af76c020bf19de5fe2e92f31d8b85cbd55c481de (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.texi | 13 |
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 | |||
| 4557 | directory outside the container is mapped inside the container. | 4557 | directory outside the container is mapped inside the container. |
| 4558 | Additionally, unless overridden with @code{--user}, a dummy home | 4558 | Additionally, unless overridden with @code{--user}, a dummy home |
| 4559 | directory is created that matches the current user's home directory, and | 4559 | directory 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. |
| 4561 | as the current user outside the container, but has root privileges in | 4561 | |
| 4562 | the context of the container. | 4562 | The spawned process runs as the current user outside the container. Inside |
| 4563 | the 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} |
| 4588 | For containers, use the username @var{user} in place of the current | 4590 | For containers, use the username @var{user} in place of the current |
| 4589 | user. The generated @file{/etc/passwd} entry within the container will | 4591 | user. The generated @file{/etc/passwd} entry within the container will |
| 4590 | contain the name @var{user}; the home directory will be | 4592 | contain 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, |
| 4594 | the UID and GID inside the container are 1000. @var{user} | ||
| 4592 | need not exist on the system. | 4595 | need not exist on the system. |
| 4593 | 4596 | ||
| 4594 | Additionally, any shared or exposed path (see @code{--share} and | 4597 | Additionally, any shared or exposed path (see @code{--share} and |
