🆕 Custom bootc images

Hi, a new experience/tooling for building “custom” CentOS bootc container images has landed: Custom Fedora/CentOS bootc base container images :: Fedora Docs

(The Fedora version is blocked on ship bootc-base-imagectl in Fedora (#44) · Issues · fedora / bootc / Base Images · GitLab which is semi-blocked on us having a container build infrastructure in Fedora, but I will probably work around it at some point soon while we’re also spinning up Konflux in parallel)

6 Likes

So nice, thank you!

Thanks!
I tried building custom Fedora images with the Containerfile and ran into rpm-ostree
error: Installing packages: Loading pkgcache branch rpmostree/pkg/[...] SELinux enabled, but no policy found errors, e.g. for NetworkManager/1_3A1.52.0-1.fc42.aarch64.
Is there a way to workaround such errors?

Hi Stephan, can you provide a slightly more full reproducer? Were you starting from the example/reference Containerfile in the documentation?

This one may be best as a bug report against e.g. fedora / bootc / Base Images · GitLab

Hi Colin,
I’m using a custom manifest, and by mistake it didn’t include the minimal manifest, which lead to the errors I mentioned. Sorry for the confusion! It works now. Thank you!

Hello All -

I have been working to evaluate and ensure the documentation for this feature is clear and people are able to get it up and running with the information provided. If anyone has any feedback on the following I would love to know what you think!

  • In general, how easy/hard was it to get it up and running? Where you eventually successful?
  • What made it difficult?
  • Is there anything you would share to make the documentation or overall experience better?

Also, yes this is my first post, I work at Red Hat on the UXD team supporting Bootc. It’s a pleasure to be here!

Thanks!

Hello @arburka and welcome to Fedora Discussion!

I build customized images, mainly based on Fedora Silverblue, but I have also tried building an image from scratch. Since I already have some experience, it was relatively easy for me.

Could you please provide links to the sections/PRs in the docs you are working on so I can read, test and give feedback. If you think it would be useful, I can also try to assist and contribute to the docs.

Thanks @hricky! Nice to meet you!

The one PR I have open right now is here. It has to do we removing the “container artifact” concept as it is not core to building a custom image. I suggested making it a section, similar to the cross builds. I plan to address the use key use case mentioned in the discussion and consider where to best move the content.

A recently closed PR is is here. This one adds additional context to the example Containerfile and splits the examples into two matching the stated goals at the top of the document.

An area that needs to be more explicit, that @bam highlighted in this post is that custom base images are a “sometimes” solution and not without trade offs. Something to the effect of:

"The goal is not to need this feature in most use cases. The custom base image feature is designed to be the “20” in the 80/20 rule and addresses very specific but important use cases that block bootc adoption without a need to fork the code.

However, the increased control is not free. Going this route means that you 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 help bootc more seamlessly fit 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 will require less work in the long run. We will explore some of the alternatives later on. But first, let’s examine the two main use goals for this feature:"

Last place I think that i can help is in the introduction. It could have additonal context, keywords, and alternatives for the feature. Right now it starts a bit abrubtly and doesn’t fully the desire for you to accomplish most tasks with the defualt base and why.

Thank you for your feedback and help!

1 Like

I agree that including such broader and less technical explanations in the official docs would be useful at least to point people to them here on the forum. I’ll look at the PRs and comment there if I have any suggestions.

In general, how easy/hard was it to get it up and running? Were you eventually successful?

The bootc fedora docs were critical in understanding and seeing real world examples. Following them I was able to get a test container up and running pretty easily. Going from a container image to something I could install on a VM is where it got hard.

What made it difficult?

bootc-image-builder (then just called Image Builder) was the only thing I found at first. Trying to use that proved difficult as I got it confused with the cockpit integration and that VM image != container image. Eventually I tried to use the Podman Desktop extension and got it to create the image easily but not an ISO or anything. I finally got it after looking at the bootc Fedora docs and seeing the example of BIB.

Is there anything you would share to make the documentation or overall experience better?

I have found working with the Universal Blue team that container image to disk image process needs to be refined. Additionally, I expect most of our users to need something like image template to be able to quickly get started. It needs to give them the tools to be able to quickly get started with CICD to output to a registry, output an ISO, easily add packages, etc. Its a lot to be able to do on your own just to experiment with a technology and there’s no local examples to show how to get started locally last time I looked.