Fedora IoT Bootc Example with Raspberry Pi
Using bootc with Fedora IoT currently requires that you have already provisioned a device with Fedora IoT.
Follow the instructions in Physical Device Setup to provision Fedora IoT to your Raspberry Pi.
Once the Raspberry Pi is provisioned successfully, you can create a custom Fedora bootc image.
Build a custom Fedora Bootc image and push it to a registry
To build your own image on your host you can create a Containerfile. This example just copies a file to /etc.
this example uses the Fedora bootc base image and does not include all of the RPMs included as part of Fedora IoT.
|
FROM quay.io/fedora/fedora-bootc:latest
COPY files/secret /etc
To build and push the image with podman run the following on the host:
podman build --platform linux/arm64 -t quay.io/username/bootc-test-image:latest
podman push quay.io/username/bootc-test-image:latest
This example uses Quay.io as the registry; you may need additional configuration to push to the registry you are using.
Cambiar el Raspberry Pi a su imagen personalizada
En el Rasberry Pi ahora puede conmutar a su imagen personal con el comando bootc switch.
conmutador bootc quay.io/username/bootc-test-image:latest
Tras reiniciar la Raspberry Pi, el archivo copiado como parte del Containerfile estaría presente en el sistema de archivos:
cat /etc/secret
Want to help? Learn how to contribute to Fedora Docs ›