@@ -26,9 +26,7 @@ each container to ranges not in use by the host system. The host ranges must be
2626
2727Subordinate UIDs and GIDs are assigned by the
2828[ subuid(5)] ( https://man.voidlinux.org/subuid.5 ) and
29- [ subgid(5)] ( https://man.voidlinux.org/subgid.5 ) files, respectively. The
30- superuser may launch unprivileged containers in the system store; regular users
31- may launch unprivileged containers in their individual stores.
29+ [ subgid(5)] ( https://man.voidlinux.org/subgid.5 ) files, respectively.
3230
3331To create unprivileged containers, first edit ` /etc/subuid ` and ` /etc/subgid ` to
3432delegate ranges. For example:
@@ -50,11 +48,12 @@ defined in the file do not overlap. In this example, `root` controls UIDs (or,
5048from ` subgid ` , GIDs) ranging from 1000000 to 1065535, inclusive; ` user ` controls
5149IDs ranging from 2000000 to 2065535.
5250
53- Before creating a container, the user owning the container will need a
54- ` default.conf ` file specifying the subuid and subgid range to use. For
55- root-owned containers, this file resides at ` /etc/lxc/default.conf ` ; for
56- unprivileged users, the file resides at ` ~/.config/lxc/default.conf ` . Mappings
57- are described in lines of the form
51+ Before creating a container, the user owning the container will need an
52+ [ lxc.conf(5)] ( https://man.voidlinux.org/lxc.conf.5 ) file, ` default.conf ` ,
53+ specifying the subuid and subgid range to use. For root-owned containers, this
54+ file resides at ` /etc/lxc/default.conf ` ; for unprivileged users, the file
55+ resides at ` ~/.config/lxc/default.conf ` . Mappings are described in lines of the
56+ form
5857
5958```
6059lxc.idmap = u 0 1000000 65536
@@ -91,10 +90,17 @@ lxc-create -n mycontainer -t download -- \
9190```
9291
9392You may substitute another architecture for ` x86_64 ` , and you may specify a
94- ` musl ` image by adding ` --variant musl ` to the end of the command. See the
95- [ LXC Image Server] ( http://images.linuxcontainers.org ) for a list of available
93+ ` musl ` image by adding ` --variant musl ` to the end of the command. See the [ LXC
94+ Image Server] ( http://images.linuxcontainers.org ) for a list of available
9695containers.
9796
97+ By default, configurations and mountpoints for system containers are stored in
98+ ` /var/lib/lxc ` , while configurations for user containers and mountpoints are
99+ stored in ` ~/.local/share/lxc ` . Both of these values can be modified by setting
100+ ` lxc.lxcpath ` in the relevant ` default.conf ` . The superuser may launch
101+ unprivileged containers in the system ` lxc.lxcpath ` ; regular users may launch
102+ unprivileged containers in their personal ` lxc.lxcpath ` .
103+
98104All containers will share the same subordinate UID and GID maps by default. This
99105is permissible, but it means that an attacker who gains elevated access within
100106one container, and can somehow break out of that container, will have similar
0 commit comments