Skip to content

Commit c9f835f

Browse files
committed
docs: Describe how to boot local builds
We want to make this use case feel awesome; today it doesn't for multiple reasons. We probably want a `bootc status --booted-image` which would print the digested pull spec to start. Then one could at least `podman pull $(bootc status --booted-image)`. But we clearly *also* want to streamline exporting from the local ostree storage back into a container, which has some downsides/bugs right now. Signed-off-by: Colin Walters <[email protected]>
1 parent 189adfe commit c9f835f

File tree

3 files changed

+53
-11
lines changed

3 files changed

+53
-11
lines changed

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
- [Upgrade and rollback](upgrades.md)
2020
- [Offline/disconnected updates](offline-updates.md)
21+
- [Booting local builds](booting-local-builds.md)
2122
- [`man bootc`](man/bootc.md)
2223
- [`man bootc status`](man/bootc-status.md)
2324
- [`man bootc upgrade`](man/bootc-upgrade.md)

docs/src/booting-local-builds.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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

Comments
 (0)