From f10aa8308e089d230ec9b3504fa3df0d89736b9e Mon Sep 17 00:00:00 2001 From: Sridhar Ratnakumar Date: Sat, 1 Feb 2025 14:30:25 -0500 Subject: [PATCH] incus: add readme --- modules/flake-parts/incus-image/README.md | 27 +++++++++++++++++++ .../default.nix} | 0 2 files changed, 27 insertions(+) create mode 100644 modules/flake-parts/incus-image/README.md rename modules/flake-parts/{incus-image.nix => incus-image/default.nix} (100%) diff --git a/modules/flake-parts/incus-image/README.md b/modules/flake-parts/incus-image/README.md new file mode 100644 index 0000000..082d8a5 --- /dev/null +++ b/modules/flake-parts/incus-image/README.md @@ -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% +``` diff --git a/modules/flake-parts/incus-image.nix b/modules/flake-parts/incus-image/default.nix similarity index 100% rename from modules/flake-parts/incus-image.nix rename to modules/flake-parts/incus-image/default.nix