Skip to main content
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 Red Hat 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

    • Red Hat OpenShift AI
    • 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.

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

    • 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.

ConsoleDocsSupport Search
New For you

Recommended

We'll recommend resources you may like as you browse. Try these suggestions for now.

  • Product downloads
  • Cheat sheets
  • Red Hat Developer learning portal
  • Developer blog
  • E-books
  • Developer Sandbox
Log in

Get more with a Red Hat Developer account

  • Product downloads
  • Console access
  • Event registration
  • Training & trials
Explore more account benefitsLog in or register

A subscription may be required for some services.

Contact us

Alternatives to creating bootc images from scratch

May 14, 2025
Ben Breard Andy Burka
Related topics:
ContainersLinux
Related products:
Image mode for Red Hat Enterprise LinuxRed Hat Enterprise Linux

    Image mode for Red Hat Enterprise Linux (RHEL) is a simple, consistent approach to build, deploy, and manage the operating system using container technologies. Similar to building any container, image mode begins with a base image and users can layer components and applications on top of it. 

    The fundamental difference lies in the base image's inclusion of critical lower-level OS components, notably the kernel, bootloader, and bootc. Bootc is the core technology that lies at the heart of image mode. This article focuses on the specifics of creating bootc images from scratch, addressing the reasons for and against this approach.

    Do you need base images from scratch?

    The goal is not to need this base image from scratch feature in most use cases. This feature, designed to be the "20" in the 80/20 rule, addresses specific and important use cases that block bootc adoption without the need to fork the code.

    However, the increased control is not free. Choosing this route means that you will carry all of the responsibilities associated with maintaining the base image. Nonetheless, if you come from the package world, you may be comfortable with this responsibility and helping bootc fit more seamlessly into your existing workflow.

    It's always a good idea to evaluate whether your environment truly needs this feature or if a suitable alternative is available that requires less work in the long run. We will talk about the alternative methods later on. 

    The benefits of bootc images from scratch

    Bootc images made from scratch provide developers and image maintainers with full control over the underlying image content, enabling them to tailor their environment to suit specific needs and workflows. This level of customization addresses several key use cases we have heard from users embarking on their bootc journey.

    The bootc-base-imagectl command allows developers to create customized base images from scratch with greater control over the OS content included in the build process. 

    2 reasons to create base images from scratch

    Let's explore the two primary reasons for creating base images from scratch and their drawbacks: 

    1. Building with specific pinned content offers version control. 

    2. Building up from a minimal base image can improve security.

    Version control with pinned content

    An organization deploying a bootc system may need to ensure the base image version carries a set of packages at specific versions. This is a particularly common issue for larger enterprise customers in highly regulated environments.

    The bootc images from scratch feature allows you to configure and override package information in source RPM repositories, enabling you to reference mirrored, pinned, or snapshotted repository content and a content view from Satellite. This provides fine-grained control over package versions and their dependencies.

    Typical scenarios where this level of precision is necessary in an enterprise workflow include the following:

    • A specific package version is required due to strict certification and compliance requirements.
    • Providing specific software versions known to work for middleware and app teams within the company, such as support for critical dependencies.

    While it's possible to add pinned packages to a default build by removing the source and adding the pinned packages in separate layers during customization, this approach leads to image bloat because all the content would be included in the image, making it less suitable for production.

    Minimal base images improve security

    An organization may want to start from a minimal base image, adding only the packages that are absolutely necessary. This approach is commonly adopted in practice to reduce the attack surface of their systems, improve their overall security posture, and minimize overall size for network efficiency.

    When building a bootc image from scratch, you can generate a new minimal image from the standard image, which only includes bootc, kernel, and dnf. This minimal image can be built up further in a multi-stage build process, creating a final image with a constrained and targeted package set.

    We see the nuance between the full customization of the base packages and an image with a Universal Base Image (UBI)-like setup. Even if the output appears the same, building on your own adds more steps and complexity. Currently, the minimal image is not shipped pre-built in the registry, but it may be available in the future. While this may not be an ideal solution for those seeking a UBI-like starting point, it represents an incremental improvement for those who desire this experience.

    Using a minimal image doesn’t come without costs. It requires more planning, experience, and knowledge of the specific environments and applications that you are running. Starting with a minimal image may lead to more issues with getting various systems to boot. We will explore this more in the next section.

    4 reasons not to use bootc images from scratch

    A core premise of the bootc model is accomplishing rich control over Linux system customization with a default container built on the provided base image without any of the overhead associated with maintaining a base image. We believe the content of the standard bootc image will deliver the best experience that works in any environment.

    We want to earn your trust, and we know it must be earned. But consider the following alternatives before taking on the extra responsibility of maintaining your own base image. 

    The following are four scenarios with viable alternatives to using the bootc images from scratch feature, which save time and effort in the long run.

    1. Security concerns

      If your motivation to build a minimal image from scratch is to reduce the potential number of CVEs by removing packages from the base image, be aware that reducing the number of packages to reduce the number of CVEs does not work on the base image. The packages are there for a reason, and more than ~90% of CVEs are in components that cannot be removed. Are you sure you are getting enough juice from the squeeze by creating a minimal image?

    2. Update concerns

      If you are considering using an image from scratch to control the update cadence to the base image, be aware that while we make new images available, you still have control when you take them.

    3. Size issues

      If the primary concern is image size, the bootc-base-imagectl tool provides a rechunk subcommand to interact with rpm-ostree and perform this rechunking. This process will optimize the ordering and grouping of installed packages in the layers of the final image, providing better network efficiency and a smaller footprint.

      You can run the rechunk subcommand on any bootc container image, not just bootc images from scratch. Compare a rechunked version of your image built from scratch to a standard base image and assess if the gains are worth the additional effort.

    4. Kernel swapping

      Creating bootc images from scratch is not required for kernel management. If your use case requires a particular kernel version and the content included in the base image is not a concern, you can do that with a standard bootc’s image and retain all the benefits and support.

    Beyond the default

    In this article, we introduced bootc images created from scratch, the use cases they target, and alternative approaches. By creating bootc images from scratch, developers and maintainers can gain complete control over the underlying image content, allowing them to tailor their environment to meet specific needs and workflows. This level of customization addresses several common pain points associated with using pre-configured images, providing a tailored solution for users on their bootc journey.

    Related Posts

    • bootc: Getting started with bootable containers

    • How to build, deploy, and manage image mode for RHEL

    • How image mode for RHEL improves security

    • Build and deploy image mode for RHEL on OpenShift Virtualization

    Recent Posts

    • A day in the life of an NVIDIA H100 on Red Hat OpenShift 5

    • Migrate BuildConfigs to builds for Red Hat OpenShift with one plug-in install

    • Run Red Hat Enterprise Linux CoreOS on NVIDIA BlueField DPUs

    • Agent harness engineering: Separating model capabilities from enforcement

    • What's new for developers in Red Hat Enterprise Linux 10.3 and 9.9

    What’s up next?

    Here's a guide on how to use Buildah to work with existing container images, build new ones, and push a container to a container registry.

    Get the cheat sheet
    Red Hat Developers logo

    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
    Ask AI