|
1 | | -# Streamlining podman + bootc interactions |
| 1 | +# Common synchronized files |
2 | 2 |
|
3 | | -NOTE: This project is now in maintenance mode, and will be succeeded by |
4 | | -[bcvk](https://github.com/bootc-dev/bcvk). Currently though, bcvk [does not |
5 | | -support MacOS](https://github.com/bootc-dev/bcvk/issues/21) and so MacOS |
6 | | -users should continue to use podman-bootc for now. |
7 | | - |
8 | | -## Goals |
9 | | - |
10 | | -- Be a scriptable CLI that offers an efficient and ergonomic "edit-compile-debug" cycle for bootable containers. |
11 | | -- Be a backend for <https://github.com/containers/podman-desktop-extension-bootc> |
12 | | -- Work on both MacOS and Linux |
13 | | - |
14 | | -## Running |
15 | | - |
16 | | -First and foremost, `podman-bootc` requires a *rootful* Podman Machine to be |
17 | | -running, which is the default on MacOS and Windows. On Linux, make sure to |
18 | | -create a Podman Machine via `podman machine init --rootful --now` which implies |
19 | | -that you need to run podman with `--remote` command to make built images |
20 | | -available to `podman-bootc`. |
21 | | - |
22 | | -The core command right now is: |
23 | | - |
24 | | -```shell |
25 | | -podman-bootc run <imagename> |
26 | | -``` |
27 | | - |
28 | | -This command creates a new virtual machine, backed by a persistent disk |
29 | | -image from a "self install" of the container image, and makes a SSH |
30 | | -connection to it. |
31 | | - |
32 | | -This requires SSH to be enabled by default in your base image; by |
33 | | -default an automatically generated SSH key is injected via a systemd |
34 | | -credential attached to qemu. |
35 | | - |
36 | | -Even after you close the SSH connection, the machine continues to run. |
37 | | - |
38 | | -### Other commands: |
39 | | - |
40 | | -- `podman-bootc list`: List running VMs |
41 | | -- `podman-bootc ssh`: Connect to a VM |
42 | | -- `podman-bootc rm`: Remove a VM |
43 | | - |
44 | | -### Architecture |
45 | | - |
46 | | -At the current time the `run` command uses a |
47 | | -[bootc install](https://containers.github.io/bootc/bootc-install.html) |
48 | | -flow - where the container installs itself executed in a privileged |
49 | | -mode inside the podman-machine VM. |
50 | | - |
51 | | -The installation target is a raw disk image is created on the host, but loopback |
52 | | -mounted over virtiofs/9p from the podman-machine VM. |
53 | | - |
54 | | -(The need for a real-root privileged container to write Linux filesystems is part of the |
55 | | - rationale for requiring podman-machine even on Linux is that |
56 | | - it keeps the architecture aligned with MacOS (where it's always required)) |
57 | | - |
58 | | -In the future, support for installing via [Anaconda](https://github.com/rhinstaller/anaconda/) |
59 | | -and [bootc-image-builder](https://github.com/osbuild/bootc-image-builder) |
60 | | -will be added. |
61 | | - |
62 | | -## Installation |
63 | | - |
64 | | -### MacOS |
65 | | - |
66 | | -First be sure you have the Podman Desktop [bootc extension requirements](https://github.com/containers/podman-desktop-extension-bootc?tab=readme-ov-file#requirements). |
67 | | - |
68 | | -On MacOS you can use homebrew to install podman-bootc: |
69 | | - |
70 | | -``` |
71 | | -brew tap germag/podman-bootc |
72 | | -brew install podman-bootc |
73 | | -``` |
74 | | - |
75 | | -alternatively, you can download the latest development cutting-edge source |
76 | | - |
77 | | -``` |
78 | | -brew install --head podman-bootc |
79 | | -``` |
80 | | - |
81 | | -It will install xorriso and libvirt, but it doesn't install qemu. |
82 | | -You need to install qemu manually, using brew: |
83 | | -``` |
84 | | -brew install qemu |
85 | | -``` |
86 | | -or by other mean and make it available in the path. |
87 | | - |
88 | | -### Fedora |
89 | | - |
90 | | -For Fedora 40+ and Rawhide we provide a COPR repository. |
91 | | -First, enable the COPR repository: |
92 | | - |
93 | | -``` |
94 | | -sudo dnf -y install 'dnf-command(copr)' |
95 | | -sudo dnf -y copr enable gmaglione/podman-bootc |
96 | | -``` |
97 | | - |
98 | | -then you can install `podman-bootc` as usual: |
99 | | - |
100 | | -``` |
101 | | -sudo dnf -y install podman-bootc |
102 | | -``` |
103 | | - |
104 | | -## Building from source: |
105 | | - |
106 | | -Our generic dependencies: |
107 | | - |
108 | | -- qemu-system-x86_64 / qemu-system-aarch64 |
109 | | -- xorriso/osirrox |
110 | | -- golang |
111 | | -- libvirt-devel |
112 | | - |
113 | | -To compile it, just run in the project directory: |
114 | | - |
115 | | -```shell |
116 | | -make |
117 | | -``` |
| 3 | +Files placed in this repository are automatically |
| 4 | +synchronized (via a pull request) to all repositories |
| 5 | +in the bootc-dev organization. |
0 commit comments