From 82000bb7f44e003f159999fbcaa8debe9af4d6c1 Mon Sep 17 00:00:00 2001 From: okjodom Date: Fri, 11 Oct 2024 14:36:52 +0300 Subject: [PATCH 1/2] feat: build clientd oci --- flake.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/flake.nix b/flake.nix index f667d71..8d2e2ee 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,7 @@ "src" "multimint" "fedimint-clientd" + "fedimint-nwc" "clientd-stateless" ]; }; @@ -106,6 +107,14 @@ packages = [ "fedimint-clientd" ]; mainProgram = "fedimint-clientd"; }; + + fedimint-clientd-oci = pkgs.dockerTools.buildLayeredImage { + name = "fedimint-clientd"; + contents = [ fedimint-clientd ]; + config = { + Cmd = [ "${fedimint-clientd}/bin/fedimint-clientd" ]; + }; + }; } ); in From c4037eba748b901ec015a55e1fba43a06dddc072 Mon Sep 17 00:00:00 2001 From: okjodom Date: Sun, 20 Oct 2024 11:19:41 +0300 Subject: [PATCH 2/2] docs: add instructions for building docker oci --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/README.md b/README.md index 9545ca1..91de204 100644 --- a/README.md +++ b/README.md @@ -72,3 +72,30 @@ curl http://localhost:3333/v2/admin/info -H 'Authorization: Bearer some-secure-p - `/health`: health check endpoint. - `/metrics`: exports API metrics using opentelemetry with prometheus exporter (num requests, latency, high-level metrics only) + +## Fedimint Clientd on Docker + +Fedimint Clientd is not officially supported on Docker. However, you can build, publish and deploy your own docker image by following these steps: + +- Build an OCI image + +``` +nix build .#fedimint-clientd-oci && docker load < ./result +``` + +- confirm the image is built and loaded in your local docker registry + +``` +docker image ls + +# REPOSITORY TAG IMAGE ID CREATED SIZE +# fedimint-clientd f4cb5pgsw4sn7mg93xwyvx09ib4qg3rd ff8cf0f0805b 54 years ago 91.1MB1.1GB +# ... +``` + +- Tag the image image appropriately then publish to your preferred registry + +``` +docker tag fedimint-clientd /fedimint-clientd:v0.4.0 +docker push /fedimint-clientd:v0.4.0 +```