Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: document install, prerequists and list-images #3

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 92 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,98 @@

Build images from the commandline in a convenient way.

## Installation

This project is under development right now and needs to be run via:
```console
$ go run github.com/osbuild/image-builder-cli/cmd/image-builder@main
```
or install it into $GOPATH/bin
```console
$ go install github.com/osbuild/image-builder-cli/cmd/image-builder@main
```

we plan to provide rpm packages as well.


## Prerequisites

Make sure to have the required `osbuild` rpms installed:
```console
$ sudo dnf install osbuild osbuild-depsolve-dnf osbuild-composer
```
(`osbuild-composer` is only needed to get the repository definitions
and this dependency will go away soon).

## Example

To see the list of buildable images run:
```console
$ image-builder list-images
...
centos-9 type:qcow2 arch:x86_64
...
rhel-10.0 type:ami arch:x86_64
...
```

It is possible to filter:
```console
$ image-builder list-images --filter ami
...
centos-9 type:ami arch:x86_64
...
rhel-8.5 type:ami arch:aarch64
...
rhel-10.0 type:ami arch:aarch64
```
or be more specific
```console
$ image-builder list-images --filter "arch:x86*" --filter "distro:*centos*"
centos-9 type:ami arch:x86_64
...
centos-9 type:qcow2 arch:x86_64
...
```

The following filters are currently supported, shell-style globbing is supported:
* distro: the distro name (e.g. fedora-41)
* arch: the architecture name (e.g. x86_64)
* type: the image type name (e.g. qcow2)
* bootmode: the bootmode (legacy, uefi, hybrid)

The output can also be switched, supported are "text", "json":
```console
$ image-builder list-images --output=json
[
{
"distro": {
"name": "centos-9"
},
"arch": {
"name": "aarch64"
},
"image_type": {
"name": "ami"
}
},
...
{
"distro": {
"name": "rhel-10.0"
},
"arch": {
"name": "x86_64"
},
"image_type": {
"name": "wsl"
}
}
]

```


## FAQ

Q: Does this require a backend.
Expand Down