From 9a0ac84ef10b7ad6a6b29331c9bef046adbefa54 Mon Sep 17 00:00:00 2001 From: "Han Verstraete (OpenFaaS Ltd)" Date: Fri, 3 Oct 2025 13:50:55 +0200 Subject: [PATCH] Add instructions for local registry Add instructions to use a local registry with the function builder API on faasd. Signed-off-by: Han Verstraete (OpenFaaS Ltd) --- docs/edge/builder.md | 110 ++++++++++++++++++++++++++++++++++++++----- 1 file changed, 99 insertions(+), 11 deletions(-) diff --git a/docs/edge/builder.md b/docs/edge/builder.md index 32969e3..d12341e 100644 --- a/docs/edge/builder.md +++ b/docs/edge/builder.md @@ -11,20 +11,83 @@ The builder runs as a non-root user making use of user namespaces in Linux. * Docker must not be installed on the host system. * faasd-pro version 0.2.23 or later is required. -## Create a registry secret +## Configure a registry -For testing purposes, you can use an ephemeral registry which requires no authentication such as [ttl.sh](https://ttl.sh). +We will be deploying a local container registry as an additional service with faasd and configure the function builder to push images to it. -Bear in mind that this ephemeral cluster is public, and have much more latency than your final production setup. +Create the credentials that will be used to login to the registry. The following commands create credentials for a user named faasd. +The credentials are saved to the file `/var/lib/faasd/registry/auth/htpasswd` in a hashed format, you’ll also need to take a copy of the plaintext version of the password, so that you can authenticate +to the registry. -```bash -sudo tee /var/lib/faasd/secrets/docker-config < ~/registry-password.txt + +htpasswd -Bbc ./htpasswd faasd $PASSWORD +sudo mv ~/htpasswd /var/lib/faasd/registry/auth/htpasswd +``` + +Create a configuration file for the registry: + +```sh +sudo cat >> /var/lib/faasd/registry/config.yml <