### Using bootc-base-imagectl rechunk Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/bootc-base-imagectl.md Example command to run the rechunk operation within a container. ```bash podman run --rm --privileged -v /var/lib/containers:/var/lib/containers quay.io/fedora/fedora-bootc:rawhide \ bootc-base-imagectl rechunk quay.io/exampleos/exampleos:build quay.io/exampleos/exampleos:latest ``` -------------------------------- ### Build and Test Commands Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/CONTRIBUTING.md Examples of using the 'just' command for building and testing base images with various configurations. ```bash just build # defaults TIER=minimal just build # different tier FEDORA_VERSION=43 just test # different Fedora version BUILDER=podman just build # use podman instead of buildah just ci # full CI run (validate + test all tiers) ``` -------------------------------- ### Building a Split Image with Chunkah Arguments Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/CONTRIBUTING.md Example of passing extra arguments to chunkah during the build process. ```bash BUILDER_EXTRA='--build-arg CHUNKAH_ARGS="--max-layers 128"' just build --chunkah ``` -------------------------------- ### Generating a new image using CentOS Stream 10 content from RHEL Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/bootc-base-imagectl.md This multi-stage Dockerfile example shows how to use CentOS Stream 10 as a repository source and RHEL as a builder image to create a new container image, incorporating custom configurations and systemd units. ```dockerfile FROM quay.io/centos/centos:stream10 as repos FROM registry.redhat.io/rhel10/rhel-bootc:10 as builder RUN --mount=type=bind,from=repos,src=/,dst=/repos,rw /usr/libexec/bootc-base-imagectl build-rootfs --manifest=minimal /repos /target-rootfs # This container image uses the "artifact pattern"; it has some # basic configuration we expect to apply to multiple container images. FROM quay.io/exampleos/baseconfig@sha256:.... as baseconfig FROM scratch COPY --from=builder /target-rootfs/ / # Now we make other arbitrary changes. Copy our systemd units and # other tweaks from the baseconfig container image. COPY --from=baseconfig /usr/ /usr/ RUN <-compose │ │ │ │ These images contain the RPM repositories used by base-images. │ └──────────────────────────────────────────────────────────────────────┘ │ ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ 1. BUILD (triggered by git push or Renovate) │ │ │ │ Source: gitlab.com/fedora/bootc/base-images │ │ Pipeline: .tekton/fedora-bootc-*-push.yaml │ │ Input: REPOS_IMAGE from compose-images │ │ │ │ Output: quay.io/konflux-fedora/bootc-tenant/ │ │ fedora-bootc--:{{revision}} │ └──────────────────────────────────────────────────────────────────────┘ │ ▼ (Konflux creates Snapshot) ┌──────────────────────────────────────────────────────────────────────┐ │ 2. RELEASE (auto-triggered by ReleasePlan) │ │ │ │ ReleasePlan: release-fedora-bootc-to-quay-io │ │ Pipeline: push-to-external-registry │ └──────────────────────────────────────────────────────────────────────┘ │ ▼ ┌──────────────────────────────────────────────────────────────────────┐ │ 3. OUTPUT │ │ │ │ quay.io/bootc-devel/fedora-bootc--standard │ │ quay.io/bootc-devel/fedora-bootc--standard │ │ quay.io/bootc-devel/fedora-bootc--minimal │ │ quay.io/bootc-devel/fedora-bootc--minimal-plus │ │ quay.io/bootc-devel/fedora-bootc--iot │ └──────────────────────────────────────────────────────────────────────┘ ``` -------------------------------- ### Running the tests Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/tests/rootfs/README.md Builds a test image and then removes it. ```shell podman build --from localhost/fedora-bootc:latest -t localhost/test-bootc . podman rmi localhost/test-bootc:latest # Clean up any created images ``` -------------------------------- ### Uploader Configuration: Subvariant to Repository Mapping Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/RELEASE.md Configuration snippet from `ansible/roles/openshift-apps/cloud-image-uploader/templates/config.toml` showing the mapping of the 'base' subvariant to the 'fedora-bootc' repository. ```toml [consumer_config.container.repos] base = "fedora-bootc" # subvariant "base" → repo "fedora-bootc" IoT = "fedora-iot" ``` -------------------------------- ### Uploader Configuration: Target Registries Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/RELEASE.md Configuration snippet from `ansible/roles/openshift-apps/cloud-image-uploader/templates/config.toml` specifying the target container registries for image uploads. ```toml [[consumer_config.container.registries]] url = "registry.fedoraproject.org" [[consumer_config.container.registries]] url = "quay.io/fedora" ``` -------------------------------- ### Remove Tenant Configuration Directory Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/RELEASE.md Commands to remove the EOL version directory and update kustomization.yaml in the tenants-config repository. ```bash cd cluster/kfluxfedorap01/bootc-tenant/applications/fedora-bootc/ # Edit kustomization.yaml to remove "42" from resources # Delete the version directory rm -rf 42/ ``` -------------------------------- ### Remove EOL Release Pipelines from compose-images Repo Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/RELEASE.md Commands to remove EOL Tekton pipeline configuration files from the compose-images repository. ```bash cd .tekton/ git rm fedora-bootc-42-compose-*.yaml ``` -------------------------------- ### Remove Tekton Pipelines Source: https://gitlab.com/fedora/bootc/base-images/-/blob/main/RELEASE.md Commands to remove Tekton pipeline configuration files for an EOL Fedora version from the base-images repository. ```bash cd .tekton/ git rm fedora-bootc-42-*.yaml ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.