diff options
| author | renner <80410025+renner0e@users.noreply.github.com> | 2026-06-17 16:16:34 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-06-17 16:16:34 +0200 |
| commit | a65bb3da1f7c5ed04ac3d8b5f69878c5ecee14ea (patch) | |
| tree | c43390563ea091322338d9c0c8bf8038a58b6160 /README.md | |
| parent | 3a675cb7b6b8242f2482225eceef178788dce508 (diff) | |
| download | AeroCore-OS-a65bb3da1f7c5ed04ac3d8b5f69878c5ecee14ea.tar.gz AeroCore-OS-a65bb3da1f7c5ed04ac3d8b5f69878c5ecee14ea.zip | |
refactor: rewrite in just, saner defaults (#218)
* refactor: rewrite in just, saner defaults
I think it makes sense to do this as it is longterm easier to maintain,
locally iterate and extend.
Documents how to rebase to a local image, it pains me greatly when
people iterate on github and wait forever for things to build and then
to download the image for trivial things they could also quickly do
locally.
Rpm-ostree rechunker by default instead of opt-in legacy-rechunker,
chunkah is also available if people want to use it already, if we deem
it ready then we can enable it later on. They can all be opted-out of.
Have a way to copy files to /{usr,etc} by default.
We should sign the digest of the image instead of the tag.
Co-Authored-by: a lot of sugar and bad music
* docs: bump fedora-bootc version
Co-authored-by: Jill Fiore <contact@lumaeris.com>
* fix: formatting inconsistency
Co-authored-by: Jill Fiore <contact@lumaeris.com>
* docs: remove variable mentions from workflows
These are now defined in the image-template.env file
* fix: small nits in labels
Co-authored-by: Adam Fidel <ledif@users.noreply.github.com>
---------
Co-authored-by: Jill Fiore <contact@lumaeris.com>
Co-authored-by: Adam Fidel <ledif@users.noreply.github.com>
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 50 |
1 files changed, 46 insertions, 4 deletions
@@ -89,7 +89,7 @@ For a base image, you can choose any of the Universal Blue images or start from - Aurora: `ghcr.io/ublue-os/aurora:stable` - Bluefin: `ghcr.io/ublue-os/bluefin:stable` - Universal Blue Base: `ghcr.io/ublue-os/base-main:latest` -- Fedora: `quay.io/fedora/fedora-bootc:42` +- Fedora: `quay.io/fedora/fedora-bootc:44` You can find more Universal Blue images on the [packages page](https://github.com/orgs/ublue-os/packages). </details> @@ -102,11 +102,11 @@ This will show you all the info you need to know about your current image. The i ### Step 2c: Changing Names -Change the first line in the [Justfile](./Justfile) to your image's name. +Change the `IMAGE_NAME` and `REPO_ORGANIZATION` variable inside the `image-template.env` To commit and push all the files changed and added in step 2 into your Github repository: ```bash -git add Containerfile Justfile cosign.pub +git add Containerfile image-template.env cosign.pub git commit -m "Initial Setup" git push ``` @@ -132,7 +132,7 @@ The [build.sh](./build_files/build.sh) file is called from your Containerfile. I ## build.yml -The [build.yml](./.github/workflows/build.yml) Github Actions workflow creates your custom OCI image and publishes it to the Github Container Registry (GHCR). By default, the image name will match the Github repository name. There are several environment variables at the start of the workflow which may be of interest to change. +The [build.yml](./.github/workflows/build.yml) Github Actions workflow creates your custom OCI image and publishes it to the Github Container Registry (GHCR). By default, the image name will match the Github repository name. # Building Disk Images @@ -173,12 +173,16 @@ To use it, you must have installed [just](https://just.systems/man/en/introducti ## Environment Variables +These are all sourced from the `image-template.env` file. + - `image_name`: The name of the image (default: "image-template"). - `default_tag`: The default tag for the image (default: "latest"). - `bib_image`: The Bootc Image Builder (BIB) image (default: "quay.io/centos-bootc/bootc-image-builder:latest"). ## Building The Image +All these recipes will work (with default values) without supplying any arguments to them, e.g. `just build` + ### `just build` Builds a container image using Podman. @@ -191,6 +195,44 @@ Arguments: - `$target_image`: The tag you want to apply to the image (default: `$image_name`). - `$tag`: The tag for the image (default: `$default_tag`). +### Rechunking +We can flatten the layers of container images to make sure there isn't a single huge layer when your image gets published. +This does not make your image faster to download, just provides better resumability. + +#### `just ostree-rechunk` +Rechunks the existing Image with [rpm-ostree](https://coreos.github.io/rpm-ostree/build-chunked-oci/) + +```bash +just ostree-rechunk $target_image $tag +``` + +#### `just rechunk` +Rechunks the existing Image with [chunkah](https://github.com/coreos/chunkah), this is probably gonna be the default here at some point, try it out, it's cool. + +```bash +just rechunk $target_image $tag +``` + +### Switching to the locally built image for testing + +The image has to be in the containers-storage owned by root, to be able to rebase to it, see the `_rootful_load_image` recipe. + +`sudo just build` and `sudo just ostree-rechunk` builds directly as root and allows you to skip the transfer to the root containers-storage. + +You can rebase to all the images that are in your containers-storage: + +``` +sudo podman image list --filter=label=containers.bootc=1 +``` + +See [man bootc switch](https://bootc.dev/bootc/man/bootc-switch.8.html) for more info. + +``` +sudo bootc switch --transport containers-storage localhost/myimage:latest +``` + +and reboot your system! + ## Building and Running Virtual Machines and ISOs The below commands all build QCOW2 images. To produce or use a different type of image, substitute in the command with that type in the place of `qcow2`. The available types are `qcow2`, `iso`, and `raw`. |
