Local builds and rebase

What is the recommended way to rebase to an image built locally?

To be concrete:
I installed Fedora atomic sway.
Then I cloned this repo and build the image: GitHub - thesaigoneer/idefix-saigon: Nwg-shell for Sway and Hyprland on UBlue

Then I built the image with:
podman build -t idefix-saigon .

If I were using the remote image, I would do:

rpm-ostree rebase ostree-unverified-registry:ghcr.io/thesaigoneer/idefix-saigon:latest
systemctl reboot

then:

rpm-ostree rebase ostree-image-signed:docker://ghcr.io/thesaigoneer/idefix-saigon:latest
systemctl reboot

But how I can accomplish this with a locally built image? I know it wouldn’t make sense in this case when a remote image is available, but I’m curious how it could be done for more general local build cases.

If you are locally building it and it’s in your image store you can use bootc switch

If built using rootful podman
bootc switch --transport containers-storage /name/of/image

Built using docker
bootc switch --transport docker-daemon /name/of/image

Take a look at the different transport options. By default it will use registry.

You will likely not go through the process of making it a signed image since you will not serve it from a registry

Thanks! I’ll share the other error I ran into in case someone runs into them.

I still ran into trouble with

bootc switch --transport containers-storage localhost/idefix-saigon:latest

which gave me this error:

failed to invoke method OpenImage: failed to invoke method OpenImage: reference "[overlay@/var/lib/containers/storage+/run/containers/storage:overlay.imagestore=/usr/lib/containers/storage,overlay.mountopt=nodev,metacopy=on]docker.io/library/idefix-saigon:latest" does not resolve to an image ID

I had not built the image with sudo, so when I looked at where the images were with:

podman info --format '{{.Store.GraphRoot}}'

I saw they were in my user’s home under .local/share/containers/storage.

Like you said, it must be built using “rootful podman,” so I reran as:

sudo podman build -t localhost/idefix-saigon --pull=always .

Then did:

sudo bootc switch --transport containers-storage localhost/idefix-saigon:latest

and that worked.

Just laying it out here explicitly in case others get similar errors.

1 Like