Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: document new idmap= option for lxc.rootfs.options #3829

Merged
merged 1 commit into from
May 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion doc/lxc.container.conf.sgml.in
Original file line number Diff line number Diff line change
Expand Up @@ -1497,7 +1497,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</term>
<listitem>
<para>
extra mount options to use when mounting the rootfs.
Specify extra mount options to use when mounting the rootfs.
The format of the mount options corresponds to the
format used in fstab. In addition, LXC supports the custom
<option>idmap=</option> mount option. This option can be used
to tell LXC to create an idmapped mount for the container's
rootfs. This is useful when the user doesn't want to recursively
chown the rootfs of the container to match the idmapping of the
user namespace the container is going to use. Instead an
idmapped mount can be used to handle this.
The argument for
<option>idmap=</option>
can either be a path pointing to a user namespace file that
LXC will open and use to idmap the rootfs or the special value
"container" which will instruct LXC to use
the container's user namespace to idmap the rootfs.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -3098,6 +3112,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
lxc.mount.fstab = /etc/fstab.complex
lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
lxc.rootfs.path = dir:/mnt/rootfs.complex
lxc.rootfs.options = idmap=container
lxc.cap.drop = sys_module mknod setuid net_raw
lxc.cap.drop = mac_override
</programlisting>
Expand Down