Updated lxc readme

main
Gasper Spagnolo 2022-09-27 09:49:19 +02:00
parent bc1dc2490f
commit ac72425586
1 changed files with 8 additions and 9 deletions

17
lxc.md
View File

@ -10,28 +10,27 @@ Follow [this](https://www.digitalocean.com/community/tutorials/how-to-install-an
### Launch and list containers: ### Launch and list containers:
```bash ```bash
lxc launch ubuntu:22.04 testserver lxc launch ubuntu:22.04 <container-name>
lxc list lxc list
``` ```
to stop a container to stop a container:
```bash ```bash
lxc stop lxc stop <container-name>
``` ```
to delete a container:
### Setup static ip for container: ### Setup static ip for container:
```bash ```bash
lxc config device override testserver eth0 lxc config device override <container-name> eth0
lxc config device set testserver eth0 ipv4.address <container-ip> lxc config device set <container-name> eth0 ipv4.address <container-ip>
``` ```
### Start a shell inside a container: ### Start a shell inside a container:
``` ```
lxc shell testserver lxc shell <container-name>
``` ```
### Exposing container to the public: ### Exposing container to the public:
To bos naredu ti doma s svojim serverjem heehe (mas navodila step4 na zgornjem linku) Todo, for now follow linked tutorial.