|
| 1 | +# Booting local builds |
| 2 | + |
| 3 | +In some scenarios, you may want to boot a *locally* built |
| 4 | +container image, in order to apply a persistent hotfix |
| 5 | +to a specific server, or as part of a development/testing |
| 6 | +scenario. |
| 7 | + |
| 8 | +## Building a new local image |
| 9 | + |
| 10 | +At the current time, the bootc host container storage is distinct |
| 11 | +from that of the `podman` container runtime storage (default |
| 12 | +configuration in `/var/lib/containers`). |
| 13 | + |
| 14 | +It not currently streamlined to export the booted host container |
| 15 | +storage into the podman storage. |
| 16 | + |
| 17 | +Hence today, to replicate the exact container image the |
| 18 | +host has booted, take the container image referenced |
| 19 | +in `bootc status` and turn it into a `podman pull` |
| 20 | +invocation. |
| 21 | + |
| 22 | +Next, craft a container build file with your desired changes: |
| 23 | +``` |
| 24 | +FROM <image> |
| 25 | +RUN apt|dnf upgrade https://example.com/systemd-hotfix.package |
| 26 | +``` |
| 27 | + |
| 28 | +## Copying an updated image into the bootc storage |
| 29 | + |
| 30 | +This command is straightforward; we just need to tell bootc |
| 31 | +to fetch updates from `containers-storage`, which is the |
| 32 | +local "application" container runtime (podman) storage: |
| 33 | + |
| 34 | +``` |
| 35 | +$ bootc switch --transport containers-storage quay.io/fedora/fedora-bootc:40 |
| 36 | +``` |
| 37 | + |
| 38 | +From there, the new image will be queued for the next boot |
| 39 | +and a `reboot` will apply it. |
| 40 | + |
| 41 | +For more on valid transports, see [containers-transports](https://github.com/containers/image/blob/main/docs/containers-transports.5.md). |
0 commit comments