|
1 | | -# A devcontainer for work on bootc-org projects |
| 1 | +# A devcontainer for work on bootc-dev projects |
2 | 2 |
|
3 | | -This container image is suitable for use on |
4 | | -developing projects in the bootc-dev organization, |
5 | | -especially bootc. |
| 3 | +This is an image designed for the [devcontainer ecosystem](https://containers.dev/) |
| 4 | +along with targeting the development of projects in this bootc-dev |
| 5 | +organization, especially bootc. |
6 | 6 |
|
7 | | -The goal is to make this completely usable as a devcontainer |
8 | | -with tools such as VSCode remote containers, Codespaces, |
9 | | -[devpod](https://devpod.sh/) and others. |
| 7 | +## Components |
10 | 8 |
|
11 | | -Specifically this includes e.g.: |
12 | | - |
13 | | -- Rust and C/C++ toolchains |
| 9 | +- Rust, Go and C/C++ toolchains |
| 10 | +- podman (for nested containers, see below) |
14 | 11 | - `nu` |
15 | | -- [tmt](https://tmt.readthedocs.io/) |
16 | | -- [Kani](https://model-checking.github.io/kani/usage.html) for system verification |
| 12 | +- [bcvk](https://github.com/bootc-dev/bcvk/) to launch bootc VMs |
| 13 | +- [tmt](https://tmt.readthedocs.io/) since bootc testing requires it |
| 14 | +- [Kani](https://model-checking.github.io/kani/usage.html) |
| 15 | + |
| 16 | +## Base images |
17 | 17 |
|
18 | | -## Base image |
| 18 | +There are two images: |
19 | 19 |
|
20 | | -At the current time the default is using Debian sid, mainly because |
21 | | -other parts of the upstream use CentOS Stream as a *target system* |
22 | | -base, but this helps prove out the general case of "src != target" |
23 | | -that is a philosophy of bootc (and containers in general) |
24 | | -as well as just helping prepare/motivate for bootc-on-Debian. |
| 20 | +- [ghcr.io/bootc-dev/devenv-debian](https://github.com/orgs/bootc-dev/packages/container/package/devenv-debian) which uses Debian sid as a base |
| 21 | +- [ghcr.io/bootc-dev/devenv-c10s](https://github.com/orgs/bootc-dev/packages/container/package/devenv-c10s) which uses CentOS Stream 10 as a base |
25 | 22 |
|
26 | 23 | ## Nested container support |
27 | 24 |
|
28 | 25 | This image supports running `podman` and `podman build` inside the container |
29 | | -(podman-in-podman). The `userns-setup` script configures the environment at |
30 | | -container startup. |
31 | | - |
32 | | -### Reference: quay.io/podman/stable |
33 | | - |
34 | | -Our nested container configuration is based on the official |
35 | | -[quay.io/podman/stable](https://github.com/containers/image_build/tree/main/podman) |
36 | | -image. Key differences: |
37 | | - |
38 | | -| Feature | quay.io/podman/stable | bootc-devenv | |
39 | | -|---------|----------------------|--------------| |
40 | | -| **default_sysctls** | `[]` | `[]` | |
41 | | -| **cgroups** | `"disabled"` | `"disabled"` (constrained) / `"no-conmon"` (full) | |
42 | | -| **cgroup_manager** | `"cgroupfs"` | `"cgroupfs"` | |
43 | | -| **netns/userns/ipcns/utsns/cgroupns** | `"host"` for all | `utsns = "host"` (constrained only) | |
44 | | -| **BUILDAH_ISOLATION** | `chroot` (env var) | Not set (uses OCI default) | |
45 | | -| **subuid/subgid** | Hardcoded for `podman` user | Dynamically calculated based on available UID range | |
46 | | -| **storage** | Modified storage.conf for fuse-overlayfs | VOLUME mounts avoid overlay-on-overlay | |
47 | | - |
48 | | -### Constrained vs full UID namespace |
49 | | - |
50 | | -The `userns-setup` script detects whether we're running in a constrained UID |
51 | | -namespace (typical for rootless podman, GitHub Codespaces, etc.) and adjusts: |
| 26 | +(podman-in-podman). The [userns-setup](userns-setup) script configures the environment at |
| 27 | +container startup, handling both constrained (Codespaces, rootless) and full UID namespaces. |
52 | 28 |
|
53 | | -- **Full namespace** (>100k UIDs): Uses default subuid/subgid, `cgroups = "no-conmon"` |
54 | | -- **Constrained namespace** (<100k UIDs): Dynamically calculates subuid/subgid |
55 | | - ranges, uses `cgroups = "disabled"` and `utsns = "host"` |
| 29 | +Note that in order to enable this you will also need to pair it with |
| 30 | +a [devcontainer JSON](../common/.devcontainer/devcontainer.json). |
56 | 31 |
|
57 | 32 | ## Building locally |
58 | 33 |
|
|
0 commit comments