No description
Find a file
Simon Steinbeiss 51e4171caf actions: Add pr-best-practices workflow
This commit adds the pr-best-practices check, which prevents pull
requests without descriptions being merged and which allows developers
to quickly create Jira Tasks based on the /jira-epic command in pull
request descriptions or comments.
2024-12-20 15:41:37 +00:00
.github actions: Add pr-best-practices workflow 2024-12-20 15:41:37 +00:00
cmd/image-builder ibcli: use /var/cache/image-builder/store as default for --store 2024-12-19 11:35:15 +00:00
internal manifestgen: use temporary cache dir if no cacheDir is given 2024-12-19 08:49:26 +00:00
test test: move to centos-9 for the smoke test 2024-12-19 11:33:13 +00:00
tools package: spec file 2024-12-19 14:45:01 +00:00
.gitignore Makefile: support for make release_artifacts 2024-12-19 14:45:01 +00:00
.packit.yaml .packit.yaml: fix patching the spec file 2024-12-19 14:45:01 +00:00
Containerfile ibcli: use /var/cache/image-builder/store as default for --store 2024-12-19 11:35:15 +00:00
entrypoint.sh ibcli: use /var/cache/image-builder/store as default for --store 2024-12-19 11:35:15 +00:00
go.mod build(deps): bump the go-deps group with 2 updates 2024-12-20 05:21:56 +00:00
go.sum build(deps): bump the go-deps group with 2 updates 2024-12-20 05:21:56 +00:00
HACKING.md HACKING.md: add basic documentation for the development 2024-12-16 07:54:45 +00:00
image-builder-cli.spec Post release version bump 2024-12-20 14:30:01 +00:00
LICENSE chore: LICENSE 2024-12-16 09:13:44 +00:00
Makefile Makefile: support building commit and version based tarball 2024-12-19 14:45:01 +00:00
README.md Containerfile: initial version 2024-12-19 08:49:26 +00:00

image-builder CLI

Build images from the commandline in a convenient way.

Run via container

$ sudo podman run --privileged \
   -v ./output:/output \
   ghcr.io/osbuild/image-builder-cli:latest \
   build \
   --distro fedora-41 \
   minimal-raw

Installation

This project is under development right now and needs to be run via:

$ go run github.com/osbuild/image-builder-cli/cmd/image-builder@main

or install it into $GOPATH/bin

$ 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:

$ 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).

Examples

To see the list of buildable images run:

$ image-builder list-images
...
centos-9 type:qcow2 arch:x86_64
...
rhel-10.0 type:ami arch:x86_64
...

To actually build an image run:

$ sudo image-builder build qcow2 --distro centos-9
...

this will create a directory centos-9-qcow2-x86_64 under which the output is stored.

It is possible to filter:

$ 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

$ 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":

$ 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. A: The osbuild binary is used to actually build the images but beyond that no setup is required, i.e. no daemons like osbuild-composer.

Project

Repository