Last active
August 29, 2015 14:20
-
-
Save ewxrjk/6c532651533403dd31c3 to your computer and use it in GitHub Desktop.
Debian sid unprivileged container setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install required packages: | |
# apt-get install uidmap lxc | |
# ..and cgmanager? or not? Who can say? | |
Enable unshare: | |
# echo 'kernel.unprivileged_userns_clone = 1' >> /etc/sysctl.d/local.conf | |
# sysctl --system | |
Check /etc/subuid and /etc/subgid and add ranges if missing, e.g.: | |
# usermod -v 886432-951967 richard | |
# usermod -w 886432-951967 richard | |
Set up user: | |
$ mkdir ~/.config/lxc | |
$ cp /etc/lxc/default.conf ~/.config/lxc/ | |
Add UID/GID range: | |
$ cat .config/lxc/default.conf | |
lxc.network.type = empty | |
lxc.id_map = u 0 886432 65536 | |
lxc.id_map = g 0 886432 65536 | |
...still doesn't work. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment