Skip to main content
The Image Factory is a way for you to dynamically create Talos Linux images. There is a public, hosted version of the Image Factory at factory.talos.dev and it can also be run in your environment. The Image Factory is a critical component of Omni to generate installation media and update Talos nodes, but it is not required to use Omni to use the Image Factory. It is a web interface and API for the imager command which is used to customize Talos from the command line.

Prerequisites

  • Machine to run Image Factory
  • crane
  • docker or podman
Podman is known to work but has some flags that are different than docker and you may have to translate them for your version of podman.

Container registry

If you already have a container registry available you can export your registry to an environment variable. and skip to create an image cache signing key.
REGISTRY_ENDPOINT=registry.internal:5000
If you don’t have a container registry available to push images to you can temporarily run one with the registry container. We recommend using the official registry:2 registry from docker as some registries do not support all OCI images.
This example doesn’t have persistent storage.
We recommend using certificates for your temporary registry you will need to provide your own certificates and mount them into the container at run time. If you do not have certificates, follow the steps in the Omni air-gapped documentation.
docker run -d \
  --name registry \
  -p 5000:5000 \
  -v ${PWD}/server-key.pem:/certs/server-key.pem:ro \
  -v ${PWD}/server-chain.pem:/certs/server-chain.pem:ro \
  -e REGISTRY_HTTP_ADDR=0.0.0.0:5000 \
  -e REGISTRY_HTTP_TLS_KEY=/certs/server-key.pem \
  -e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/server-chain.pem \
  registry:2
Make sure the CA certificate is in your system pki path and docker has restarted to trust the certificate.

Image cache signing key

You need to create a Cache Signing Key to sign cached Talos image artifacts, ensuring they haven’t been tampered with before being served.
openssl ecparam -name prime256v1 -genkey -noout -out signing-key.key

Image cache storage (optional)

There are a variety of image cache locations to store built images. Without an image cache, each asset will be built on demand which can consume a high amount of CPU on the image factory machine. Some supported cache storage options include:
  • CDN
  • s3 bucket (or compatible API)
Please view the --help output for cache options.

Run Image Factory

There are two supported methods to run the Image Factory:
  • Connected to the upstream Sidero container registry
  • Using a custom container registry
A custom container registry is required for air-gapped environments or custom Talos builds.
Run with the official, upstream container registry if your machine is connected to the internet and you don’t need custom Talos images.
The official Sidero Labs registry has all of the required Talos installation containers, extensions, and tools. If you want to run image factory connected to the upstream container registry you can do it with:
docker run -p 8080:8080 -d \
  --name image-factory \
  -v $PWD/signing-key.key:/signing-key.key:ro \
  ghcr.io/siderolabs/image-factory:v0.9.0 \
    -cache-signing-key-path /signing-key.key \
    -schematic-service-repository $REGISTRY_ENDPOINT/siderolabs/image-factory/schematic
If your system has SELinux enabled you will need to mount the signing key with the :Z option so the image factory has access to the file.
This will run the image factory on your machine on port 8080 and automatically pull container images from Sidero’s registry. It will also validate image signatures using cosign to validate pulled images.This will not allow you to create or publish custom system extensions. To do that you will need to run your own container registry with the necessary images. See the disconnected instructions for Image Factory.
You should now be able to browse to https://registry.internal:8080 and view the Image Factory web interface. If your server or network has any firewall rules you may need to allow TCP traffic to the host.

Run Omni

After the image factory is running you can continue to the Omni Airgapped documentation.