Pushing and updating bootc images with a container registry
Pushing and updating bootc images with a container registry¶
Follow these procedures to push a bootc container image to a registry and update running systems from the registry.
For background on the registry-centric update model, see Registry interactions.
Prerequisites¶
Before you begin, verify that you have the following:
- Podman installed. See the Podman installation guide for instructions.
- Automotive Image Builder installed. See Installing Automotive Image Builder for instructions.
- A bootc container image built with
aib build. See the bootc image building procedure for instructions. - Access to a container registry, for example Quay.io, a private registry, or an OpenShift internal registry.
skopeoinstalled if you plan to push OCI archives. Most Linux distributions includeskopeoin their default repositories.
Push an image to a registry from local storage¶
Use this workflow when aib build stored the image in local Podman
storage (the default behavior).
-
Tag the image for the registry. Assign a registry-qualified name and version tag to the locally built image:
console $ sudo podman tag localhost/my-image registry.example.com/autosd/my-image:v1.0Replace
registry.example.com/autosd/my-imagewith your registry path andv1.0with the desired version tag. -
Authenticate with the registry. Log in to the target registry:
console $ sudo podman login registry.example.comEnter your username and password when prompted. Podman stores the credentials for subsequent operations.
-
Push the image to the registry. Upload the tagged image:
console $ sudo podman push registry.example.com/autosd/my-image:v1.0 -
Verify the push. Confirm that the image is available in the registry:
console $ skopeo inspect docker://registry.example.com/autosd/my-image:v1.0The output displays the image metadata including digest, layers, and creation timestamp.
Push an OCI archive to a registry¶
Use this workflow when the image was built with --oci-archive and
saved to a file rather than local Podman storage.
-
Authenticate with the registry. Log in to the target registry if you have not already done so:
console $ podman login registry.example.com -
Copy the OCI archive to the registry. Use
skopeo copyto upload the archive:console $ skopeo copy \ oci-archive:my-image.oci \ docker://registry.example.com/autosd/my-image:v1.0Replace
my-image.ociwith the path to the OCI archive file. -
Verify the push. Confirm that the image is available in the registry:
console $ skopeo inspect docker://registry.example.com/autosd/my-image:v1.0
Update a running system¶
After pushing an image to a registry, you can update devices that run
AutoSD bootc images. Run the following commands on the target device.
Access the device by SSH or serial console. For virtual machines
launched with air, connect over SSH with
ssh -p 2222 root@localhost. SSH access requires that the OS image be built from a manifest that
enables PasswordAuthentication in sshd_config through the auth
section.
-
Switch to a new image. To change the image a device tracks, run:
console $ bootc switch registry.example.com/autosd/my-image:v1.0The command stages the new image for the next reboot. Use
bootc switchwhen deploying a different image or changing the registry reference. -
Update to the latest version. To pull the latest version of the currently tracked image, run:
console $ bootc updateThe command downloads and stages any available update. Use
bootc updatefor routine updates when the device already tracks the correct image. -
Check the current status. To view the booted image, any staged update, and tracking information, run:
console $ bootc status -
Reboot to apply the update. The staged image takes effect after a reboot:
console $ systemctl rebootIf the new image fails to boot, the system automatically rolls back to the previous image.
Key considerations¶
Keep these important points in mind when working with bootc OS images and container registries:
- Tagging strategy: Use semantic versions (for example,
v1.0,v1.1) or timestamps rather than relying on thelatesttag alone. Explicit version tags make it easier to track which image each device runs. - Registry storage and bandwidth: Bootc OS images are typically larger than application containers. Plan registry storage capacity and network bandwidth for the expected number of devices pulling updates.
- Signed images: If the image was built with secure boot signing enabled (composefs sealed), complete the signing workflow before pushing to the registry. Devices that enforce signature verification reject unsigned or incorrectly signed images.