diff options
author | Radostin Stoyanov <rstoyanov1@gmail.com> | 2017-07-24 09:14:01 +0100 |
---|---|---|
committer | Radostin Stoyanov <rstoyanov1@gmail.com> | 2017-07-24 14:53:15 +0100 |
commit | e92b724289120c262c635e6005703477ebaa3fe0 (patch) | |
tree | 0818289d561a264e030625310c64bb8c0c9199f2 /setup.py | |
parent | 6272ee9fa4ed42abba9e5c2ab316ea5df1a036f6 (diff) | |
download | virt-bootstrap.git-e92b724289120c262c635e6005703477ebaa3fe0.tar.gz virt-bootstrap.git-e92b724289120c262c635e6005703477ebaa3fe0.tar.xz virt-bootstrap.git-e92b724289120c262c635e6005703477ebaa3fe0.zip |
Add remapping ownership of files in rootfs
When Libvirt creates LXC container with enabled user namespace the
ownership of files in the container should be mapped to the specified
target UID/GID.
The implementation of the mapping is inspired by the tool uidmapshift:
http://bazaar.launchpad.net/%7Eserge-hallyn/+junk/nsexec/view/head:/uidmapshift.c
Mapping values can be specified with the flags:
--idmap Map both UIDs/GIDs
--uidmap Map UIDs
--gidmap Map GIDs
Each of these flags can be specified multiple times.
Example:
virt-bootstrap docker://fedora /tmp/foo --uidmap 0:1000:10 --gidmap 0:1000:10
Will map the ownership of files with UIDs/GIDs: 0-9 to 1000-1009
The same result can be achived with:
virt-bootstrap docker://fedora /tmp/foo --idmap 0:1000:10
Multiple mapping values can be specified as follows:
virt_bootstrap.py docker://ubuntu /tmp/foo --idmap 0:1000:10 --idmap 500:1500:10
This will map the UID/GIDs: 0-9 to 1000-1009 and 500-509 to 1500-1509
Diffstat (limited to 'setup.py')
0 files changed, 0 insertions, 0 deletions