lxc_tips: privileged containers
This commit is contained in:
parent
66cccbea0a
commit
e8b0b29460
14
lxc_tips.md
14
lxc_tips.md
@ -47,4 +47,16 @@
|
|||||||
* To a container: `$ lxc file push [/local/files/to/copy] [container]/[destination/path]`
|
* 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)
|
* **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]`
|
* 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`
|
Loading…
Reference in New Issue
Block a user