Skip to content

Commit d832d4e

Browse files
committed
README.md: Various updates
* Talk about `bootc install` * Link to the demo base images * Generalize the `switch` path docs
1 parent 0851130 commit d832d4e

File tree

1 file changed

+43
-14
lines changed

1 file changed

+43
-14
lines changed

README.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
Transactional, in-place operating system updates using OCI/Docker container images.
44

5+
STATUS: Experimental, subject to change!
6+
57
# Motivation
68

79
The original Docker container model of using "layers" to model
@@ -22,18 +24,24 @@ This project currently leverages significant work done in
2224

2325
In the future, there may be non-ostree backends.
2426

25-
## Modeling operating system hosts as containers
27+
## Modeling operating system hosts as containers
2628

2729
The bootc project suggests that Linux operating systems and distributions
2830
to provide a new kind of "bootable" base image, distinct from "application"
29-
base images. A reference example available today is
30-
[Fedora CoreOS](https://quay.io/repository/fedora/fedora-coreos).
31+
base images. See below for available images.
32+
33+
Effectively, these images contain a Linux kernel - and while this kernel
34+
is not used when the image is used via e.g. `podman|docker run`, it *is*
35+
used when booted via `bootc`.
36+
37+
In the current defaults, `/etc` and `/var` both act a bit like
38+
mounted, persistent volumes. More on this in [the ostree docs](https://ostreedev.github.io/ostree/adapting-existing/#system-layout).
3139

3240
## Status
3341

3442
At the current time, bootc is in active development and is not quite
3543
considered ready for production use. The command line interface
36-
*might* change.
44+
*might* change. There is not yet stable RPC API.
3745

3846
However, it heavily relies on a lot of underlying technologies which
3947
are tested, and the goal is to stabilize everything sometime in
@@ -43,10 +51,18 @@ are tested, and the goal is to stabilize everything sometime in
4351

4452
### Installing
4553

46-
At the current time, there are no official binary releases; this will
47-
likely change in the future. For now, assuming you've done a `cargo build --release`
48-
and you have a `target/release/bootc` binary, you can copy that onto
49-
a target host system that is booted using ostree.
54+
* Fedora, CentOS Stream 9: There is a [COPR](https://copr.fedorainfracloud.org/coprs/rhcontainerbot/bootc/) tracking git main with binary packages.
55+
56+
You can also build this project like any other Rust project, e.g. `cargo build --release` from a git clone.
57+
58+
### Base images
59+
60+
Many users will be more interested in base (container) images.
61+
62+
* The [bootc-demo-base-images](https://github.com/cgwalters/bootc-demo-base-images) contains demonstration (relatively) small images that can be used as a starting point.
63+
* [Fedora CoreOS](https://quay.io/repository/fedora/fedora-coreos) can also be used as a base image, but it does not currently include `bootc`.
64+
65+
However, bootc itself is not tied to Fedora derivatives; and the plan is to extend the set of images.
5066

5167
### Deriving from and switching to base images
5268

@@ -58,16 +74,29 @@ There are a number of examples in e.g. [coreos/layering-examples](https://github
5874

5975
First, build a derived container using any container build tooling.
6076

61-
Next, given a disk image (e.g. AMI, qcow2, raw disk image) installed on a host
62-
system and set up using ostree by default, the `bootc switch` command
63-
can be used to switch the system to use the targeted container image:
77+
#### Using `bootc install`
78+
79+
The `bootc install` command will write the current container to a disk, and set it up for booting.
80+
81+
For example, booting a Fedora-derivative (including CentOS and RHEL) system, whether a cloud guest or a live ISO, you can invoke:
82+
83+
```
84+
$ podman run --privileged --pid=host --net=none --security-opt label=type:unconfined_t --target-no-signature-verification ghcr.io/cgwalters/c9s-oscore bootc install /path/to/disk
85+
```
86+
87+
As noted above though, if you create a *derivative* container image, it also automatically supports `bootc install`.
88+
89+
#### Switching from an existing ostree-based system
90+
91+
If you have [an operating system already using ostree](https://ostreedev.github.io/ostree/#operating-systems-and-distributions-using-ostree) then you can use `bootc switch`:
6492

6593
```
6694
$ bootc switch --no-signature-verification quay.io/examplecorp/custom:latest
6795
```
6896

6997
This will preserve existing state in `/etc` and `/var` - for example,
70-
host SSH keys and home directories.
98+
host SSH keys and home directories. There may be some issues with uid/gid
99+
drift in this scenario however.
71100

72101
### Upgrading
73102

@@ -81,7 +110,7 @@ preserving state.
81110

82111
Today rpm-ostree directly links to `ostree-rs-ext`, and hence
83112
gains all the same container functionality. This will likely
84-
continue. For example, with rpm-ostree (or, perhaps re-framed as
113+
continue. For example, with rpm-ostree (or, perhaps re-framed as
85114
"dnf image"), it will continue to work to e.g. `dnf install`
86115
(i.e. `rpm-ostree install`) on the *client side* system. However, `bootc upgrade` would
87116
(should) then error out as it will not understand how to upgrade
@@ -106,7 +135,7 @@ Further, bootc does aim to [include some of the functionality of zincati](https:
106135
But all this said: *It will be supported to use both bootc and rpm-ostree together*; they are not exclusive.
107136
For example, `bootc status` at least will still function even if packages are layered.
108137

109-
# More links
138+
# More links
110139

111140
- https://fedoraproject.org/wiki/Changes/OstreeNativeContainerStable
112141
- https://coreos.github.io/rpm-ostree/container/

0 commit comments

Comments
 (0)