Skip to content

Commit 88e0054

Browse files
committed
Merge branch 'chrivers/docker-builder-docs'
2 parents cfb7b9d + 323340e commit 88e0054

File tree

7 files changed

+108
-19
lines changed

7 files changed

+108
-19
lines changed

book/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- [live-disk-image](builders/live-disk-image.md)
2020
- [disk-image](builders/disk-image.md)
2121
- [part-image](builders/part-image.md)
22+
- [docker-image](builders/docker-image.md)
2223
- [Environment settings](builders/environment.md)
2324

2425
---

book/src/builders/deblive.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ in, and the first input will be the default boot option.
3333

3434
| Target | Compatible? |
3535
|:-----------------------------|:------------|
36-
| Container (`systemd-nspawn`) ||
36+
| Container: `systemd-nspawn` ||
37+
| Container: `docker` ||
38+
| Container: `podman` ||
3739
| Virtual Machine (UEFI) ||
3840
| Virtual Machine (BIOS) ||
3941
| Physical Machine (UEFI) ||

book/src/builders/disk-image.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
| Target | Compatible? |
1111
|:-----------------------------|:--------------------|
12-
| Container (`systemd-nspawn`) | ✅ (`raw`) |
12+
| Container: `systemd-nspawn` | ✅ (`raw`) |
13+
| Container: `docker` ||
14+
| Container: `podman` ||
1315
| Virtual Machine (UEFI) | ✅ (`raw`, `qcow2`) |
1416
| Virtual Machine (BIOS) ||
1517
| Physical Machine (UEFI) | ✅ (`raw`) |

book/src/builders/docker-image.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Docker Image generator:<br>**`docker-image`**
2+
3+
| Mount name | Type | Usage |
4+
|:-----------|:-------|:------------------------------------------------------|
5+
| `input` | Layers | The Raptor build target to genrate as a docker image. |
6+
| `output` | File | Points to the resulting docker image file. |
7+
8+
This builder generates a Docker image from a Raptor target.
9+
10+
Each layer in Raptor (one for the target, plus one for each `FROM`) becomes a
11+
Docker layer in the generated image. This allows shared Raptor layers to stay
12+
shared when converted to Docker images.
13+
14+
## Compatibility
15+
16+
| Target | Compatible? |
17+
|:----------------------------|:------------|
18+
| Container: `systemd-nspawn` ||
19+
| Container: `docker` ||
20+
| Container: `podman` ||
21+
| Virtual Machine (UEFI) ||
22+
| Virtual Machine (BIOS) ||
23+
| Physical Machine (UEFI) ||
24+
| Physical Machine (BIOS) ||
25+
26+
## Example
27+
28+
Prerequisites:
29+
30+
- [raptor-builders](https://github.com/chrivers/raptor-builders) is cloned to `raptor-builders`
31+
- An input target called `test.rapt`
32+
33+
~~~admonish note title="Raptor.toml"
34+
```toml
35+
[raptor.link]
36+
rbuild = "raptor-builders"
37+
38+
# Docker image
39+
[run.docker1]
40+
target = "$rbuild.docker-image" # <-- builder is specified here
41+
input = ["test"]
42+
output = "test.tar"
43+
```
44+
~~~
45+
46+
After this `Raptor.toml` is in place, call `raptor make` to build:
47+
48+
```sh
49+
sudo raptor make docker1
50+
```
51+
52+
When the process is complete, `test.tar` will be ready for use.
53+
54+
It can be imported:
55+
56+
```sh
57+
# import to Docker
58+
docker load -i test.tar
59+
60+
# import to Podman
61+
podman load -i test.tar
62+
```

book/src/builders/index.md

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ time, by using the build containers from
2626
| [`live-disk-image`](live-disk-image.md) | Debian Liveboot disk image | `raw`, `qcow2`, `vmdk`, ... |
2727
| [`disk-image`](disk-image.md) | Disk image | `raw`, `qcow2`, `vmdk`, ... |
2828
| [`part-image`](part-image.md) | Partition (filesystem) image | `raw`, `qcow2`, `vmdk`, ... |
29+
| [`docker-image`](docker-image.md) | Docker image | `tar` |
2930

3031
## Compatibility
3132

@@ -37,17 +38,34 @@ However, not all combinations are possible. For example, a physical machine will
3738
not boot a `qcow2` image for virtual machines, but `qemu` will be able to boot
3839
either `qcow2` or `raw` images.
3940

40-
The table below provides an overview of the possible options.
41+
The tables below provides an overview of the possible options.
4142

42-
| Builder | Format | nspawn | Virtual Machine | Physical Machine |
43-
|:------------------|---------|:-------|:-------------------|:-------------------|
44-
| `deblive` | `iso` || UEFI:✅ -- BIOS:✅ | UEFI:✅ -- BIOS:✅ |
45-
| `live-disk-image` | `qcow2` || UEFI:✅ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
46-
| `disk-image` | `qcow2` || UEFI:✅ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
47-
| `live-disk-image` | `raw` || UEFI:✅ -- BIOS:❌ | UEFI:✅ -- BIOS:❌ |
48-
| `disk-image` | `raw` || UEFI:✅ -- BIOS:❌ | UEFI:✅ -- BIOS:❌ |
49-
| `part-image` | `raw` || UEFI:❌ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
43+
Machines:
5044

45+
| Builder | Format | Virtual Machine | Physical Machine |
46+
|:------------------|---------|:-------------------|:-------------------|
47+
| `deblive` | `iso` | UEFI:✅ -- BIOS:✅ | UEFI:✅ -- BIOS:✅ |
48+
| `live-disk-image` | `qcow2` | UEFI:✅ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
49+
| `disk-image` | `qcow2` | UEFI:✅ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
50+
| `live-disk-image` | `raw` | UEFI:✅ -- BIOS:❌ | UEFI:✅ -- BIOS:❌ |
51+
| `disk-image` | `raw` | UEFI:✅ -- BIOS:❌ | UEFI:✅ -- BIOS:❌ |
52+
| `part-image` | `raw` | UEFI:❌ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
53+
| `docker-image` | `tar` | UEFI:❌ -- BIOS:❌ | UEFI:❌ -- BIOS:❌ |
54+
55+
~~~admonish note
5156
Currently, booting in BIOS mode is only supported by the `deblive` builder, but
5257
the `live-disk-image` and `disk-image` builders could possibly be extended to
5358
support this, in the future.
59+
~~~
60+
61+
Containers:
62+
63+
| Builder | Format | `systemd-nspawn` | `docker` | `podman` |
64+
|:------------------|---------|:-----------------|:---------|----------|
65+
| `deblive` | `iso` ||||
66+
| `live-disk-image` | `qcow2` ||||
67+
| `disk-image` | `qcow2` ||||
68+
| `live-disk-image` | `raw` ||||
69+
| `disk-image` | `raw` ||||
70+
| `part-image` | `raw` ||||
71+
| `docker-image` | `tar` ||||

book/src/builders/live-disk-image.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,15 @@ prerequisite packages are installed.
1515

1616
## Compatibility
1717

18-
| Target | Compatible? |
19-
|:-----------------------------|:--------------------|
20-
| Container (`systemd-nspawn`) | ✅ (`raw`) |
21-
| Virtual Machine (UEFI) | ✅ (`raw`, `qcow2`) |
22-
| Virtual Machine (BIOS) ||
23-
| Physical Machine (UEFI) | ✅ (`raw`) |
24-
| Physical Machine (BIOS) ||
18+
| Target | Compatible? |
19+
|:----------------------------|:--------------------|
20+
| Container: `systemd-nspawn` ||
21+
| Container: `docker` ||
22+
| Container: `podman` ||
23+
| Virtual Machine (UEFI) | ✅ (`raw`, `qcow2`) |
24+
| Virtual Machine (BIOS) ||
25+
| Physical Machine (UEFI) | ✅ (`raw`) |
26+
| Physical Machine (BIOS) ||
2527

2628
This builder also generates Debian Liveboot image, but instead of generating a
2729
`.iso` file, it generates a disk image, including a partition table, and

book/src/builders/part-image.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99

1010
| Target | Compatible? |
1111
|:-----------------------------|:------------|
12-
| Container (`systemd-nspawn`) ||
12+
| Container: `systemd-nspawn` ||
13+
| Container: `docker` ||
14+
| Container: `podman` ||
1315
| Virtual Machine (UEFI) ||
1416
| Virtual Machine (BIOS) ||
1517
| Physical Machine (UEFI) ||

0 commit comments

Comments
 (0)