lxc_tips: privileged containers
This commit is contained in:
parent
66cccbea0a
commit
e8b0b29460
12
lxc_tips.md
12
lxc_tips.md
@ -48,3 +48,15 @@
|
||||
* **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 .`
|
||||
|
||||
## 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`
|
Loading…
Reference in New Issue
Block a user