Skip to content

Commit

Permalink
incus: add readme
Browse files Browse the repository at this point in the history
  • Loading branch information
srid committed Feb 1, 2025
1 parent a95f675 commit f10aa83
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions modules/flake-parts/incus-image/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
To build the image,

```sh
nix run .#incus-image-container-import public-container
```

To launch a container using it,

```sh
incus launch srid/public-container --ephemeral test
```

`public-container` runs nginx serving Hello world, which can test if the container is working.

```sh
# Find the IP
❯ incus list
+------+---------+----------------------+-----------------------------------------------+-----------------------+-----------+
| NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS |
+------+---------+----------------------+-----------------------------------------------+-----------------------+-----------+
| test | RUNNING | 10.162.27.156 (eth0) | fd42:ef6e:8271:3b9f:216:3eff:fea2:b8a6 (eth0) | CONTAINER (EPHEMERAL) | 0 |
+------+---------+----------------------+-----------------------------------------------+-----------------------+-----------+

# curl container's nginx
❯ curl 10.162.27.156
Hello World%
```
File renamed without changes.

0 comments on commit f10aa83

Please sign in to comment.