Skip to main content
Redhat Developers  Logo
  • AI

    Get started with AI

    • Red Hat AI
      Accelerate the development and deployment of enterprise AI solutions.
    • AI learning hub
      Explore learning materials and tools, organized by task.
    • AI interactive demos
      Click through scenarios with Red Hat AI, including training LLMs and more.
    • AI/ML learning paths
      Expand your OpenShift AI knowledge using these learning resources.
    • AI quickstarts
      Focused AI use cases designed for fast deployment on Red Hat AI platforms.
    • No-cost AI training
      Foundational Red Hat AI training.

    Featured resources

    • OpenShift AI learning
    • Open source AI for developers
    • AI product application development
    • Open source-powered AI/ML for hybrid cloud
    • AI and Node.js cheat sheet

    Red Hat AI Factory with NVIDIA

    • Red Hat AI Factory with NVIDIA is a co-engineered, enterprise-grade AI solution for building, deploying, and managing AI at scale across hybrid cloud environments.
    • Explore the solution
  • Learn

    Self-guided

    • Documentation
      Find answers, get step-by-step guidance, and learn how to use Red Hat products.
    • Learning paths
      Explore curated walkthroughs for common development tasks.
    • Guided learning
      Receive custom learning paths powered by our AI assistant.
    • See all learning

    Hands-on

    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.
    • Interactive labs
      Learn by doing in these hands-on, browser-based experiences.
    • Interactive demos
      Click through product features in these guided tours.

    Browse by topic

    • AI/ML
    • Automation
    • Java
    • Kubernetes
    • Linux
    • See all topics

    Training & certifications

    • Courses and exams
    • Certifications
    • Skills assessments
    • Red Hat Academy
    • Learning subscription
    • Explore training
  • Build

    Get started

    • Red Hat build of Podman Desktop
      A downloadable, local development hub to experiment with our products and builds.
    • Developer Sandbox
      Spin up Red Hat's products and technologies without setup or configuration.

    Download products

    • Access product downloads to start building and testing right away.
    • Red Hat Enterprise Linux
    • Red Hat AI
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Featured

    • Red Hat build of OpenJDK
    • Red Hat JBoss Enterprise Application Platform
    • Red Hat OpenShift Dev Spaces
    • Red Hat Developer Toolset

    References

    • E-books
    • Documentation
    • Cheat sheets
    • Architecture center
  • Community

    Get involved

    • Events
    • Live AI events
    • Red Hat Summit
    • Red Hat Accelerators
    • Community discussions

    Follow along

    • Articles & blogs
    • Developer newsletter
    • Videos
    • Github

    Get help

    • Customer service
    • Customer support
    • Regional contacts
    • Find a partner

    Join the Red Hat Developer program

    • Download Red Hat products and project builds, access support documentation, learning content, and more.
    • Explore the benefits

Reduce bootc system update size

November 3, 2025
Chris Kyrouac
Related topics:
Containers
Related products:
Image mode for Red Hat Enterprise Linux

    Sometimes it is necessary to minimize bandwidth usage when updating a system. Typically, when updating a bootc system, you download each modified image layer. This means a modification to a single configuration file could result in downloading gigabytes of data. This is where the rpm-ostree build-chunked-oci tool is helpful. It will automatically isolate related rpm packages into separate layers and output a new image. 

    A new feature of the tool allows direct assigning of individual files to specific layers in the chunked image. Physically bound images (i.e., container images embedded in the bootc image) will benefit from this. By isolating the physically bound images into their own layer, modifications to unpackaged configuration files will not redownload the physically bound images during updates. This article will demonstrate how this works.

    Set up a test environment

    First, we need to set up a test environment. We will do this locally on our development machine, but this can easily be adapted to a production environment. Let’s start by building a new image with a large AI model embedded as a physically bound image. To add the physically bound image to a separate layer, all we need to do is set the user.component=containers xattr in the directory with the image.

    Here is the Containerfile we will build:

    FROM quay.io/fedora/fedora-bootc:42
    COPY ./embed_image.sh /usr/bin/
    RUN <<EOF
      set -euxo pipefail
      /usr/bin/embed_image.sh quay.io/ai-lab/mistral-7b-code-16k-qlora
      setfattr -n user.component -v "containers" /usr/lib/containers-image-cache
    EOF

    The embed_image.sh script is found in the fedora bootc examples repo. Save it in the same directory as the Containerfile as follows:

    #!/bin/bash
    
    set -euxo pipefail
    
    image=$1
    additional_copy_args=${2:-""}
    
    mkdir -p /usr/lib/containers-image-cache
    sha=$(echo "$image" | sha256sum | awk '{ print $1 }')
    skopeo copy $additional_copy_args --preserve-digests docker://$image dir:/usr/lib/containers-image-cache/$sha
    echo "$image,$sha" >> /usr/lib/containers-image-cache/mapping.txt

    Now let's build and push the image to Quay:

    podman build . -t quay.io/<user>/rechunker-test:latest
    podman push quay.io/<user>/rechunker-test:latest

    Finally, let’s run rpm-ostree build-chunked-oci on the image and push the chunked image to Quay.

    rpm-ostree compose build-chunked-oci --bootc --format-version=2 --from=quay.io/<user>/rechunker-test:latest --output=containers-storage:quay.io/<user>/rechunker-test:chunked
    podman push quay.io/<user>/rechunker-test:chunked

    Update a system

    Let’s see how a modification to /etc/hosts behaves when updating a system running the rechunker-test image. First, we will create a new VM using bcvk:

    bcvk libvirt run --ssh --filesystem ext4 quay.io/<user>/rechunker-test:chunked

    Now let’s modify the rechunker-test image by adding an sshd config file. Here is the updated Containerfile:

    FROM quay.io/fedora/fedora-bootc:42
    COPY ./embed_image.sh /usr/bin/
    RUN <<EOF
    set -euxo pipefail
    /usr/bin/embed_image.sh quay.io/ai-lab/mistral-7b-code-16k-qlora
    setfattr -n user.component -v "containers" /usr/lib/containers-image-cache
    EOF
    
    RUN <<EOF
    set -euxo pipefail
    
    cat > /etc/ssh/sshd_config.d/10-disable-password-auth.conf << END
    Host *
      PasswordAuthentication no
    END
    
    EOF

    We need to build, chunk, and push the image like before:

    podman build . -t quay.io/<user>/rechunker-test:latest
    podman push quay.io/<user>/rechunker-test:latest
    rpm-ostree compose build-chunked-oci --bootc --format-version=2 --from=quay.io/<user>/rechunker-test:latest --output=containers-storage:quay.io/<user>/rechunker-test:chunked
    podman push quay.io/<user>/rechunker-test:chunked

    The image is updated in Quay so we can upgrade our test VM. Notice how it downloads a single layer a few megabytes in size. This layer is all of the unpackaged content except for the physically bound image we isolated to its own layer.

    # run this on the test VM
    sudo bootc upgrade

    Now that we see how quick the update was, try running through the example without the xattr set in the Containerfile to see how long an update takes.

    Final thoughts

    Using the new rpm-ostree feature allows the assigning of individual files to specific layers in the output image. This is particularly beneficial for isolating physically bound images (i.e., large AI models) into their own layers, preventing them from being redownloaded when modifying other configuration files. Our demonstration showed the upgrade went much faster after making a simple change. Play around with this to see how best to optimize your specific images for faster updates.

    Related Posts

    • How to use system-reinstall-bootc to install a bootc image

    • Alternatives to creating bootc images from scratch

    • Use bootc logically bound images to deploy a Kafka cluster

    • bootc: Getting started with bootable containers

    Recent Posts

    • SQL Server HA on RHEL: Meet Pacemaker HA Agent v2 (tech preview)

    • Deploy with confidence: Continuous integration and continuous delivery for agentic AI

    • Every layer counts: Defense in depth for AI agents with Red Hat AI

    • Fun in the RUN instruction: Why container builds with distroless images can surprise you

    • Trusted software factory: Building trust in the agentic AI era

    What’s up next?

    Learning Path Guarantee Application Availability

    Update OpenShift applications with zero downtime using a single command

    Red Hat Developers logo LinkedIn YouTube Twitter Facebook

    Platforms

    • Red Hat AI
    • Red Hat Enterprise Linux
    • Red Hat OpenShift
    • Red Hat Ansible Automation Platform
    • See all products

    Build

    • Developer Sandbox
    • Developer tools
    • Interactive tutorials
    • API catalog

    Quicklinks

    • Learning resources
    • E-books
    • Cheat sheets
    • Blog
    • Events
    • Newsletter

    Communicate

    • About us
    • Contact sales
    • Find a partner
    • Report a website issue
    • Site status dashboard
    • Report a security problem

    RED HAT DEVELOPER

    Build here. Go anywhere.

    We serve the builders. The problem solvers who create careers with code.

    Join us if you’re a developer, software engineer, web designer, front-end designer, UX designer, computer scientist, architect, tester, product manager, project manager or team lead.

    Sign me up

    Red Hat legal and privacy links

    • About Red Hat
    • Jobs
    • Events
    • Locations
    • Contact Red Hat
    • Red Hat Blog
    • Inclusion at Red Hat
    • Cool Stuff Store
    • Red Hat Summit
    © 2026 Red Hat

    Red Hat legal and privacy links

    • Privacy statement
    • Terms of use
    • All policies and guidelines
    • Digital accessibility

    Chat Support

    Please log in with your Red Hat account to access chat support.