README.md: add a section about adding "registrations"

This is a small followup for
https://github.com/osbuild/image-builder-cli/pull/201
to include information about how to use the new
`--registrations` option.
This commit is contained in:
Michael Vogt 2025-04-23 09:39:12 +02:00 committed by Brian C. Lane
parent 4c9f2b4ba4
commit 7af1a8d8b3

View file

@ -121,6 +121,35 @@ $ sudo image-builder build qcow2 --blueprint ./config.toml --distro centos-9
...
```
### Adding registrations
Adding registrations/subscriptions to an image can be done at
build time via the `--registrations` command line option. When
using this option the resulting image will include the given
subscriptions/registrations in the resulting image.
Currently the Red Hat subscription is supported, e.g.
```console
$ cat > registrations.json <<EOF
{
"redhat": {
"subscription": {
"activation_key": "replace-with_activation_key",
"organization": "replace-with_org",
"server_url": "replace-with_server_url",
"base_url": "replace_with-base_url",
"insights": true,
"rhc": true,
"proxy": "replace-with_proxy"
}
}
}
EOF
$ sudo image-builder build qcow2 --registrations registrations.json --distro centos-9
```
Note that some of these options are optional and the image must have
`subscription-manager` installed.
### Cross architecture building
When `qemu-user-static` is installed images can be build for foreign