From 72fa9c1296628562ea38ce10b53233d8cbd0aaa0 Mon Sep 17 00:00:00 2001 From: Gasper Spagnolo Date: Tue, 27 Sep 2022 09:37:40 +0200 Subject: [PATCH] Add lxc --- lxc.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 lxc.md diff --git a/lxc.md b/lxc.md new file mode 100644 index 0000000..99697af --- /dev/null +++ b/lxc.md @@ -0,0 +1,37 @@ +# LXC + +### Installation +On debian install it using __snap__ it is the preferred way. + +### Initialization: +Follow [this](https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-lxd-on-ubuntu-20-04) tutorial to set up **lxd**. + + +### Launch and list containers: + +```bash + lxc launch ubuntu:22.04 testserver + lxc list +``` +to stop a container +```bash + lxc stop +``` + +### Setup static ip for container: + +```bash + lxc config device override testserver eth0 + lxc config device set testserver eth0 ipv4.address +``` + +### Start a shell inside a container: +``` + lxc shell testserver +``` + + +### Exposing container to the public: +To bos naredu ti doma s svojim serverjem heehe (mas navodila step4 na zgornjem linku) + +