lxc_tips: privileged containers

This commit is contained in:
Théo Marchal 2019-10-29 13:07:59 +01:00
parent 66cccbea0a
commit e8b0b29460

View File

@ -47,4 +47,16 @@
* To a container: `$ lxc file push [/local/files/to/copy] [container]/[destination/path]`
* **example:** `$ lxc file push -r /home/user/files test/root` (add `-r` to copy a folder)
* From a container: `$ lxc file pull [container][/files/to/copy] [destination/path]`
* **example:** `$ lxc file pull test/root/files .`
* **example:** `$ lxc file pull test/root/files .`
## Privileged containers
This feature is only available when LXD is installed.
* When creating a container: `lxc launch [distribution] [name] -c security.privileged=true`
* Updating an existing container: `lxc config set [container] security.privileged=true`
When a container is privileged, we can share folders from the host to the container.
* Adding a shared folder: `lxc config device add [container] [dir/homedir] disk source=[/path/] path=[/path]`
* **example:** `$ lxc config device add test homedir disk source=/home/$USER path=/home/ubuntu`