Local Image Template repo for "layering" packages in bootc

I’ve been a user of the Universal Blue base images for a very long time. As such, I usually ended up with a small layer of local packages for my client. Sometimes updating would be unreliable with package conflicts and whatnot, though.

I considered many times to use the ublue-os/image-template repo, but I didn’t really like the idea of needing to set up GitHub Actions just to get a usable base OS, nor did I need to share the packages I layered between multiple machines (which is a great reason to use that repo in the first place!)

I created a new repo RedTopper/Local-Image-Template to optimize building, caching, and deploying small Containerfile layers locally. It contains a few example Containerfiles to help folks get kickstarted with the idea. It’s similar to what’s being discussed in fedora/bootc#4, just written down and pushed somewhere.

The core of the project is really just two commands that make the whole thing possible, packed in a Justfile:

podman build --tag "{{ image }}:{{ tag }}" --tag "{{ image }}:latest" --pull=always .

and

bootc switch --transport containers-storage "{{ image }}:{{ tag }}"

If people find this concept useful, it might be worth exploring what additional infrastructure should be built around this concept, like unified container storage so you don’t need to build the image as root.

EDIT: Made fedora/bootc#4 a link

4 Likes

Here’s an example of using the template that I’m using on my own machines:

RedTopper/My-Local-Images

Branch machine/desktop: Containerfile I’m using for my destkop based on ublue/kinoite-nvidia
Branch machine/laptop: Containerfile for an intel laptop based off of fedora-ostree-desktops/kinoite

1 Like