diff --git a/lxc.md b/lxc.md index 8d4fb46..afac464 100644 --- a/lxc.md +++ b/lxc.md @@ -37,3 +37,24 @@ to delete a container: ### Exposing container to the public: Todo, for now follow linked tutorial. Host it on your own. + +### Running Docker inside lxc: +Firstly you need to create storage device: + +```bash + lxc sorage create btrfs + lxc launch images:ubuntu/22.04 +``` +Then add this storage device to container: +```bash + lxc config device add docker disk pool= source= path=/var/lib/docker +``` +Then set privileges for docker to have ability to call syscalls. +```bash + lxc config set security.nesting=true security.syscalls.intercept.mknod=true security.syscalls.intercept.setxattr=true + lxc restart +``` + + + +