Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Describe how to boot local builds #512

Merged
merged 1 commit into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

- [Upgrade and rollback](upgrades.md)
- [Offline/disconnected updates](offline-updates.md)
- [Booting local builds](booting-local-builds.md)
- [`man bootc`](man/bootc.md)
- [`man bootc status`](man/bootc-status.md)
- [`man bootc upgrade`](man/bootc-upgrade.md)
Expand Down
41 changes: 41 additions & 0 deletions docs/src/booting-local-builds.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Booting local builds

In some scenarios, you may want to boot a *locally* built
container image, in order to apply a persistent hotfix
to a specific server, or as part of a development/testing
scenario.

## Building a new local image

At the current time, the bootc host container storage is distinct
from that of the `podman` container runtime storage (default
configuration in `/var/lib/containers`).

It not currently streamlined to export the booted host container
storage into the podman storage.

Hence today, to replicate the exact container image the
host has booted, take the container image referenced
in `bootc status` and turn it into a `podman pull`
invocation.

Next, craft a container build file with your desired changes:
```
FROM <image>
RUN apt|dnf upgrade https://example.com/systemd-hotfix.package
```

## Copying an updated image into the bootc storage

This command is straightforward; we just need to tell bootc
to fetch updates from `containers-storage`, which is the
local "application" container runtime (podman) storage:

```
$ bootc switch --transport containers-storage quay.io/fedora/fedora-bootc:40
```

From there, the new image will be queued for the next boot
and a `reboot` will apply it.

For more on valid transports, see [containers-transports](https://github.com/containers/image/blob/main/docs/containers-transports.5.md).